Index: chrome/browser/extensions/extension_web_ui.h |
diff --git a/chrome/browser/extensions/extension_web_ui.h b/chrome/browser/extensions/extension_web_ui.h |
index 3a9dbd5a285e706f2891c772757610005c6811dc..07b65f222751c2d17dee5faf544ade8ec33c6bd5 100644 |
--- a/chrome/browser/extensions/extension_web_ui.h |
+++ b/chrome/browser/extensions/extension_web_ui.h |
@@ -8,6 +8,7 @@ |
#include <memory> |
#include <string> |
+#include "base/macros.h" |
#include "chrome/common/extensions/chrome_manifest_url_handlers.h" |
#include "components/favicon_base/favicon_callback.h" |
#include "content/public/browser/web_ui_controller.h" |
@@ -31,17 +32,28 @@ class PrefRegistrySyncable; |
// the main tab contents area. For example, each extension can specify an |
// "options_page", and that page is displayed in the tab contents area and is |
// hosted by this class. |
+// TODO(devlin): The above description has nothing to do with this class as far |
+// as I can tell. |
class ExtensionWebUI : public content::WebUIController { |
public: |
static const char kExtensionURLOverrides[]; |
+ // Returns true if the given url requires WebUI bindings. |
sky
2016/10/31 15:11:54
Style guide says constructor/destructor before oth
Devlin
2016/10/31 16:59:26
Done.
|
+ static bool NeedsExtensionWebUI(content::BrowserContext* browser_context, |
+ const GURL& url); |
+ |
ExtensionWebUI(content::WebUI* web_ui, const GURL& url); |
~ExtensionWebUI() override; |
- virtual extensions::BookmarkManagerPrivateDragEventRouter* |
+ extensions::BookmarkManagerPrivateDragEventRouter* |
bookmark_manager_private_drag_event_router(); |
+ // TODO(devlin): The rest of this class is static methods dealing with |
+ // chrome url overrides (e.g. changing chrome://newtab to go to an extension- |
+ // provided new tab page). This should be in a separate class from the WebUI |
+ // controller for the bookmark manager, and the WebUI controller should be |
+ // renamed. |
// BrowserURLHandler |
static bool HandleChromeURLOverride(GURL* url, |
content::BrowserContext* browser_context); |
@@ -97,8 +109,7 @@ class ExtensionWebUI : public content::WebUIController { |
std::unique_ptr<extensions::BookmarkManagerPrivateDragEventRouter> |
bookmark_manager_private_drag_event_router_; |
- // The URL this WebUI was created for. |
- GURL url_; |
+ DISALLOW_COPY_AND_ASSIGN(ExtensionWebUI); |
}; |
#endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_WEB_UI_H_ |