OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CONTENT_PUBLIC_BROWSER_WEB_UI_CONTROLLER_FACTORY_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_WEB_UI_CONTROLLER_FACTORY_H_ |
6 #define CONTENT_PUBLIC_BROWSER_WEB_UI_CONTROLLER_FACTORY_H_ | 6 #define CONTENT_PUBLIC_BROWSER_WEB_UI_CONTROLLER_FACTORY_H_ |
7 | 7 |
8 #include "content/common/content_export.h" | 8 #include "content/common/content_export.h" |
9 #include "content/public/browser/web_ui.h" | 9 #include "content/public/browser/web_ui.h" |
10 | 10 |
11 class GURL; | 11 class GURL; |
12 | 12 |
13 namespace content { | 13 namespace content { |
14 | 14 |
15 class BrowserContext; | 15 class BrowserContext; |
16 class WebContents; | |
17 class WebUIController; | 16 class WebUIController; |
18 | 17 |
19 // Interface for an object which controls which URLs are considered WebUI URLs | 18 // Interface for an object which controls which URLs are considered WebUI URLs |
20 // and creates WebUIController instances for given URLs. | 19 // and creates WebUIController instances for given URLs. |
21 class CONTENT_EXPORT WebUIControllerFactory { | 20 class CONTENT_EXPORT WebUIControllerFactory { |
22 public: | 21 public: |
23 virtual ~WebUIControllerFactory() {} | 22 virtual ~WebUIControllerFactory() {} |
24 | 23 |
25 // Call to register a factory. | 24 // Call to register a factory. |
26 static void RegisterFactory(WebUIControllerFactory* factory); | 25 static void RegisterFactory(WebUIControllerFactory* factory); |
(...skipping 18 matching lines...) Expand all Loading... |
45 const GURL& url) const = 0; | 44 const GURL& url) const = 0; |
46 | 45 |
47 // Returns true for the subset of WebUIs that actually need WebUI bindings. | 46 // Returns true for the subset of WebUIs that actually need WebUI bindings. |
48 virtual bool UseWebUIBindingsForURL(BrowserContext* browser_context, | 47 virtual bool UseWebUIBindingsForURL(BrowserContext* browser_context, |
49 const GURL& url) const = 0; | 48 const GURL& url) const = 0; |
50 }; | 49 }; |
51 | 50 |
52 } // namespace content | 51 } // namespace content |
53 | 52 |
54 #endif // CONTENT_PUBLIC_BROWSER_WEB_UI_CONTROLLER_FACTORY_H_ | 53 #endif // CONTENT_PUBLIC_BROWSER_WEB_UI_CONTROLLER_FACTORY_H_ |
OLD | NEW |