OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_EXTENSIONS_EXTENSION_WEB_UI_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_WEB_UI_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_WEB_UI_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_WEB_UI_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 23 matching lines...) Expand all Loading... |
34 static const char kExtensionURLOverrides[]; | 34 static const char kExtensionURLOverrides[]; |
35 | 35 |
36 ExtensionWebUI(TabContents* tab_contents, const GURL& url); | 36 ExtensionWebUI(TabContents* tab_contents, const GURL& url); |
37 | 37 |
38 virtual ~ExtensionWebUI(); | 38 virtual ~ExtensionWebUI(); |
39 | 39 |
40 virtual ExtensionBookmarkManagerEventRouter* | 40 virtual ExtensionBookmarkManagerEventRouter* |
41 extension_bookmark_manager_event_router(); | 41 extension_bookmark_manager_event_router(); |
42 | 42 |
43 // BrowserURLHandler | 43 // BrowserURLHandler |
44 static bool HandleChromeURLOverride(GURL* url, Profile* profile); | 44 static bool HandleChromeURLOverride(GURL* url, |
45 static bool HandleChromeURLOverrideReverse(GURL* url, Profile* profile); | 45 content::BrowserContext* browser_context); |
| 46 static bool HandleChromeURLOverrideReverse( |
| 47 GURL* url, content::BrowserContext* browser_context); |
46 | 48 |
47 // Register and unregister a dictionary of one or more overrides. | 49 // Register and unregister a dictionary of one or more overrides. |
48 // Page names are the keys, and chrome-extension: URLs are the values. | 50 // Page names are the keys, and chrome-extension: URLs are the values. |
49 // (e.g. { "newtab": "chrome-extension://<id>/my_new_tab.html" } | 51 // (e.g. { "newtab": "chrome-extension://<id>/my_new_tab.html" } |
50 static void RegisterChromeURLOverrides(Profile* profile, | 52 static void RegisterChromeURLOverrides(Profile* profile, |
51 const Extension::URLOverrideMap& overrides); | 53 const Extension::URLOverrideMap& overrides); |
52 static void UnregisterChromeURLOverrides(Profile* profile, | 54 static void UnregisterChromeURLOverrides(Profile* profile, |
53 const Extension::URLOverrideMap& overrides); | 55 const Extension::URLOverrideMap& overrides); |
54 static void UnregisterChromeURLOverride(const std::string& page, | 56 static void UnregisterChromeURLOverride(const std::string& page, |
55 Profile* profile, | 57 Profile* profile, |
(...skipping 18 matching lines...) Expand all Loading... |
74 // TODO(aa): This seems out of place. Why is it not with the event routers for | 76 // TODO(aa): This seems out of place. Why is it not with the event routers for |
75 // the other extension APIs? | 77 // the other extension APIs? |
76 scoped_ptr<ExtensionBookmarkManagerEventRouter> | 78 scoped_ptr<ExtensionBookmarkManagerEventRouter> |
77 extension_bookmark_manager_event_router_; | 79 extension_bookmark_manager_event_router_; |
78 | 80 |
79 // The URL this WebUI was created for. | 81 // The URL this WebUI was created for. |
80 GURL url_; | 82 GURL url_; |
81 }; | 83 }; |
82 | 84 |
83 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_WEB_UI_H_ | 85 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_WEB_UI_H_ |
OLD | NEW |