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 <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "content/public/browser/navigation_throttle.h" | 11 #include "content/public/browser/navigation_throttle.h" |
12 | 12 |
13 namespace content { | 13 namespace content { |
14 class NavigationHandle; | 14 class NavigationHandle; |
15 class NavigationThrottle; | 15 class NavigationThrottle; |
16 class WebContents; | |
17 } | 16 } |
18 | 17 |
19 // 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 |
20 // 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 |
21 // a UI thread class. | 20 // a UI thread class. |
22 class AppUrlRedirector { | 21 class AppUrlRedirector { |
23 public: | 22 public: |
24 static std::unique_ptr<content::NavigationThrottle> MaybeCreateThrottleFor( | 23 static std::unique_ptr<content::NavigationThrottle> MaybeCreateThrottleFor( |
25 content::NavigationHandle* handle); | 24 content::NavigationHandle* handle); |
26 | 25 |
27 private: | 26 private: |
28 DISALLOW_COPY_AND_ASSIGN(AppUrlRedirector); | 27 DISALLOW_COPY_AND_ASSIGN(AppUrlRedirector); |
29 }; | 28 }; |
30 | 29 |
31 #endif // CHROME_BROWSER_APPS_APP_URL_REDIRECTOR_H_ | 30 #endif // CHROME_BROWSER_APPS_APP_URL_REDIRECTOR_H_ |
OLD | NEW |