| 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 24 matching lines...) Expand all Loading... |
| 35 // BrowserURLHandler | 35 // BrowserURLHandler |
| 36 static bool HandleChromeURLOverride(GURL* url, | 36 static bool HandleChromeURLOverride(GURL* url, |
| 37 content::BrowserContext* browser_context); | 37 content::BrowserContext* browser_context); |
| 38 static bool HandleChromeURLOverrideReverse( | 38 static bool HandleChromeURLOverrideReverse( |
| 39 GURL* url, content::BrowserContext* browser_context); | 39 GURL* url, content::BrowserContext* browser_context); |
| 40 | 40 |
| 41 // Register and unregister a dictionary of one or more overrides. | 41 // Register and unregister a dictionary of one or more overrides. |
| 42 // Page names are the keys, and chrome-extension: URLs are the values. | 42 // Page names are the keys, and chrome-extension: URLs are the values. |
| 43 // (e.g. { "newtab": "chrome-extension://<id>/my_new_tab.html" } | 43 // (e.g. { "newtab": "chrome-extension://<id>/my_new_tab.html" } |
| 44 static void RegisterChromeURLOverrides(Profile* profile, | 44 static void RegisterChromeURLOverrides(Profile* profile, |
| 45 const Extension::URLOverrideMap& overrides); | 45 const extensions::Extension::URLOverrideMap& overrides); |
| 46 static void UnregisterChromeURLOverrides(Profile* profile, | 46 static void UnregisterChromeURLOverrides(Profile* profile, |
| 47 const Extension::URLOverrideMap& overrides); | 47 const extensions::Extension::URLOverrideMap& overrides); |
| 48 static void UnregisterChromeURLOverride(const std::string& page, | 48 static void UnregisterChromeURLOverride(const std::string& page, |
| 49 Profile* profile, | 49 Profile* profile, |
| 50 base::Value* override); | 50 base::Value* override); |
| 51 | 51 |
| 52 // Called from BrowserPrefs | 52 // Called from BrowserPrefs |
| 53 static void RegisterUserPrefs(PrefService* prefs); | 53 static void RegisterUserPrefs(PrefService* prefs); |
| 54 | 54 |
| 55 // Get the favicon for the extension by getting an icon from the manifest. | 55 // Get the favicon for the extension by getting an icon from the manifest. |
| 56 static void GetFaviconForURL(Profile* profile, | 56 static void GetFaviconForURL(Profile* profile, |
| 57 FaviconService::GetFaviconRequest* request, | 57 FaviconService::GetFaviconRequest* request, |
| (...skipping 10 matching lines...) Expand all Loading... |
| 68 // TODO(aa): This seems out of place. Why is it not with the event routers for | 68 // TODO(aa): This seems out of place. Why is it not with the event routers for |
| 69 // the other extension APIs? | 69 // the other extension APIs? |
| 70 scoped_ptr<BookmarkManagerExtensionEventRouter> | 70 scoped_ptr<BookmarkManagerExtensionEventRouter> |
| 71 bookmark_manager_extension_event_router_; | 71 bookmark_manager_extension_event_router_; |
| 72 | 72 |
| 73 // The URL this WebUI was created for. | 73 // The URL this WebUI was created for. |
| 74 GURL url_; | 74 GURL url_; |
| 75 }; | 75 }; |
| 76 | 76 |
| 77 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_WEB_UI_H_ | 77 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_WEB_UI_H_ |
| OLD | NEW |