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" |
11 #include "chrome/browser/favicon/favicon_service.h" | |
12 #include "chrome/common/extensions/manifest_url_handler.h" | 11 #include "chrome/common/extensions/manifest_url_handler.h" |
| 12 #include "components/favicon_base/favicon_callback.h" |
13 #include "content/public/browser/web_ui_controller.h" | 13 #include "content/public/browser/web_ui_controller.h" |
14 | 14 |
15 class Profile; | 15 class Profile; |
16 | 16 |
17 namespace content { | 17 namespace content { |
18 class BrowserContext; | 18 class BrowserContext; |
19 class WebContents; | 19 class WebContents; |
20 } | 20 } |
21 | 21 |
22 namespace extensions { | 22 namespace extensions { |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 const base::Value* override); | 60 const base::Value* override); |
61 | 61 |
62 // Called from BrowserPrefs | 62 // Called from BrowserPrefs |
63 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); | 63 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); |
64 | 64 |
65 // Get the favicon for the extension by getting an icon from the manifest. | 65 // Get the favicon for the extension by getting an icon from the manifest. |
66 // Note. |callback| is always run asynchronously. | 66 // Note. |callback| is always run asynchronously. |
67 static void GetFaviconForURL( | 67 static void GetFaviconForURL( |
68 Profile* profile, | 68 Profile* profile, |
69 const GURL& page_url, | 69 const GURL& page_url, |
70 const FaviconService::FaviconResultsCallback& callback); | 70 const favicon_base::FaviconResultsCallback& callback); |
71 | 71 |
72 private: | 72 private: |
73 // Unregister the specified override, and if it's the currently active one, | 73 // Unregister the specified override, and if it's the currently active one, |
74 // ensure that something takes its place. | 74 // ensure that something takes its place. |
75 static void UnregisterAndReplaceOverride(const std::string& page, | 75 static void UnregisterAndReplaceOverride(const std::string& page, |
76 Profile* profile, | 76 Profile* profile, |
77 base::ListValue* list, | 77 base::ListValue* list, |
78 const base::Value* override); | 78 const base::Value* override); |
79 | 79 |
80 // TODO(aa): This seems out of place. Why is it not with the event routers for | 80 // TODO(aa): This seems out of place. Why is it not with the event routers for |
81 // the other extension APIs? | 81 // the other extension APIs? |
82 scoped_ptr<extensions::BookmarkManagerPrivateDragEventRouter> | 82 scoped_ptr<extensions::BookmarkManagerPrivateDragEventRouter> |
83 bookmark_manager_private_drag_event_router_; | 83 bookmark_manager_private_drag_event_router_; |
84 | 84 |
85 // The URL this WebUI was created for. | 85 // The URL this WebUI was created for. |
86 GURL url_; | 86 GURL url_; |
87 }; | 87 }; |
88 | 88 |
89 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_WEB_UI_H_ | 89 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_WEB_UI_H_ |
OLD | NEW |