summaryrefslogtreecommitdiffstats
path: root/chrome/browser/apps/ephemeral_app_throttle.h
blob: 3ae429fe330218acc54d0ddf7f9ff4282fc021fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CHROME_BROWSER_APPS_EPHEMERAL_APP_THROTTLE_H_
#define CHROME_BROWSER_APPS_EPHEMERAL_APP_THROTTLE_H_

#include "base/basictypes.h"

namespace content {
class ResourceThrottle;
}

namespace net {
class URLRequest;
}

class ProfileIOData;

// This class creates resource throttles that will launch ephemeral apps for
// links to Chrome Web Store detail pages instead of opening the page in the
// browser. This will only occur if the enable-ephemeral-apps switch is enabled.
class EphemeralAppThrottle {
 public:
  static content::ResourceThrottle* MaybeCreateThrottleForLaunch(
      net::URLRequest* request,
      ProfileIOData* profile_io_data);

 private:
  DISALLOW_COPY_AND_ASSIGN(EphemeralAppThrottle);
};

#endif  // CHROME_BROWSER_APPS_EPHEMERAL_APP_THROTTLE_H_