OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_APPS_APP_URL_REDIRECTOR_H_ | 5 #ifndef CHROME_BROWSER_APPS_APP_URL_REDIRECTOR_H_ |
6 #define CHROME_BROWSER_APPS_APP_URL_REDIRECTOR_H_ | 6 #define CHROME_BROWSER_APPS_APP_URL_REDIRECTOR_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/macros.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "content/public/browser/navigation_throttle.h" | 10 #include "content/public/browser/navigation_throttle.h" |
11 | 11 |
12 namespace content { | 12 namespace content { |
13 class NavigationHandle; | 13 class NavigationHandle; |
14 class NavigationThrottle; | 14 class NavigationThrottle; |
15 class WebContents; | 15 class WebContents; |
16 } | 16 } |
17 | 17 |
18 // This class creates navigation throttles that redirect URLs to apps that have | 18 // This class creates navigation throttles that redirect URLs to apps that have |
19 // a matching URL handler in the 'url_handlers' manifest key. Note that this is | 19 // a matching URL handler in the 'url_handlers' manifest key. Note that this is |
20 // a UI thread class. | 20 // a UI thread class. |
21 class AppUrlRedirector { | 21 class AppUrlRedirector { |
22 public: | 22 public: |
23 static scoped_ptr<content::NavigationThrottle> MaybeCreateThrottleFor( | 23 static scoped_ptr<content::NavigationThrottle> MaybeCreateThrottleFor( |
24 content::NavigationHandle* handle); | 24 content::NavigationHandle* handle); |
25 | 25 |
26 private: | 26 private: |
27 DISALLOW_COPY_AND_ASSIGN(AppUrlRedirector); | 27 DISALLOW_COPY_AND_ASSIGN(AppUrlRedirector); |
28 }; | 28 }; |
29 | 29 |
30 #endif // CHROME_BROWSER_APPS_APP_URL_REDIRECTOR_H_ | 30 #endif // CHROME_BROWSER_APPS_APP_URL_REDIRECTOR_H_ |
OLD | NEW |