| 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 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 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 | 43 |
| 44 // Register and unregister a dictionary of one or more overrides. | 44 // Register and unregister a dictionary of one or more overrides. |
| 45 // Page names are the keys, and chrome-extension: URLs are the values. | 45 // Page names are the keys, and chrome-extension: URLs are the values. |
| 46 // (e.g. { "newtab": "chrome-extension://<id>/my_new_tab.html" } | 46 // (e.g. { "newtab": "chrome-extension://<id>/my_new_tab.html" } |
| 47 static void RegisterChromeURLOverrides(Profile* profile, | 47 static void RegisterChromeURLOverrides(Profile* profile, |
| 48 const extensions::Extension::URLOverrideMap& overrides); | 48 const extensions::Extension::URLOverrideMap& overrides); |
| 49 static void UnregisterChromeURLOverrides(Profile* profile, | 49 static void UnregisterChromeURLOverrides(Profile* profile, |
| 50 const extensions::Extension::URLOverrideMap& overrides); | 50 const extensions::Extension::URLOverrideMap& overrides); |
| 51 static void UnregisterChromeURLOverride(const std::string& page, | 51 static void UnregisterChromeURLOverride(const std::string& page, |
| 52 Profile* profile, | 52 Profile* profile, |
| 53 base::Value* override); | 53 const base::Value* override); |
| 54 | 54 |
| 55 // Called from BrowserPrefs | 55 // Called from BrowserPrefs |
| 56 static void RegisterUserPrefs(PrefService* prefs); | 56 static void RegisterUserPrefs(PrefService* prefs); |
| 57 | 57 |
| 58 // Get the favicon for the extension by getting an icon from the manifest. | 58 // Get the favicon for the extension by getting an icon from the manifest. |
| 59 static void GetFaviconForURL(Profile* profile, | 59 static void GetFaviconForURL(Profile* profile, |
| 60 FaviconService::GetFaviconRequest* request, | 60 FaviconService::GetFaviconRequest* request, |
| 61 const GURL& page_url); | 61 const GURL& page_url); |
| 62 | 62 |
| 63 private: | 63 private: |
| 64 // Unregister the specified override, and if it's the currently active one, | 64 // Unregister the specified override, and if it's the currently active one, |
| 65 // ensure that something takes its place. | 65 // ensure that something takes its place. |
| 66 static void UnregisterAndReplaceOverride(const std::string& page, | 66 static void UnregisterAndReplaceOverride(const std::string& page, |
| 67 Profile* profile, | 67 Profile* profile, |
| 68 base::ListValue* list, | 68 base::ListValue* list, |
| 69 base::Value* override); | 69 const base::Value* override); |
| 70 | 70 |
| 71 // TODO(aa): This seems out of place. Why is it not with the event routers for | 71 // TODO(aa): This seems out of place. Why is it not with the event routers for |
| 72 // the other extension APIs? | 72 // the other extension APIs? |
| 73 scoped_ptr<BookmarkManagerExtensionEventRouter> | 73 scoped_ptr<BookmarkManagerExtensionEventRouter> |
| 74 bookmark_manager_extension_event_router_; | 74 bookmark_manager_extension_event_router_; |
| 75 | 75 |
| 76 // The URL this WebUI was created for. | 76 // The URL this WebUI was created for. |
| 77 GURL url_; | 77 GURL url_; |
| 78 }; | 78 }; |
| 79 | 79 |
| 80 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_WEB_UI_H_ | 80 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_WEB_UI_H_ |
| OLD | NEW |