Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(555)

Unified Diff: chrome/browser/extensions/extension_dom_ui.h

Issue 126137: Part 1 of merging Extensions and DOMUI (Closed)
Patch Set: add test and rebase Created 11 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/dom_ui/dom_ui_factory.cc ('k') | chrome/browser/extensions/extension_dom_ui.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_dom_ui.h
diff --git a/chrome/browser/extensions/extension_dom_ui.h b/chrome/browser/extensions/extension_dom_ui.h
new file mode 100644
index 0000000000000000000000000000000000000000..2de94cf2858e26a64cdc83683df8b24f77c033e3
--- /dev/null
+++ b/chrome/browser/extensions/extension_dom_ui.h
@@ -0,0 +1,33 @@
+#ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_DOM_UI_H_
+#define CHROME_BROWSER_EXTENSIONS_EXTENSION_DOM_UI_H_
+
+#include "base/scoped_ptr.h"
+#include "chrome/browser/dom_ui/dom_ui.h"
+#include "chrome/browser/extensions/extension_function_dispatcher.h"
+
+// This class implements DOMUI for extensions and allows extensions to put UI in
+// the main tab contents area.
+class ExtensionDOMUI
+ : public DOMUI,
+ public ExtensionFunctionDispatcher::Delegate {
+ public:
+ explicit ExtensionDOMUI(TabContents* tab_contents);
+ ExtensionFunctionDispatcher* extension_function_dispatcher() const {
+ return extension_function_dispatcher_.get();
+ }
+
+ // DOMUI
+ virtual void RenderViewCreated(RenderViewHost* render_view_host);
+ virtual void ProcessDOMUIMessage(const std::string& message,
+ const std::string& content,
+ int request_id,
+ bool has_callback);
+
+ // ExtensionFunctionDispatcher::Delegate
+ virtual Browser* GetBrowser();
+
+ private:
+ scoped_ptr<ExtensionFunctionDispatcher> extension_function_dispatcher_;
+};
+
+#endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_DOM_UI_H_
« no previous file with comments | « chrome/browser/dom_ui/dom_ui_factory.cc ('k') | chrome/browser/extensions/extension_dom_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698