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

Unified Diff: chrome/browser/extensions/extension_host.cc

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/extensions/extension_host.h ('k') | chrome/browser/extensions/extension_startup_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_host.cc
diff --git a/chrome/browser/extensions/extension_host.cc b/chrome/browser/extensions/extension_host.cc
index 94b759d5f28e887dc3d31f3f105b860465b95d12..669dbddff95bc17cdd7c2769ee5a2b7793e3f040 100644
--- a/chrome/browser/extensions/extension_host.cc
+++ b/chrome/browser/extensions/extension_host.cc
@@ -20,6 +20,7 @@
#include "chrome/browser/tab_contents/infobar_delegate.h"
#include "chrome/browser/tab_contents/tab_contents.h"
#include "chrome/browser/tab_contents/tab_contents_view.h"
+#include "chrome/common/bindings_policy.h"
#include "chrome/common/extensions/extension.h"
#include "chrome/common/notification_service.h"
#include "chrome/common/pref_names.h"
@@ -84,7 +85,7 @@ ExtensionHost::ExtensionHost(Extension* extension, SiteInstance* site_instance,
url_(url) {
render_view_host_ = new RenderViewHost(
site_instance, this, MSG_ROUTING_NONE, NULL);
- render_view_host_->AllowExtensionBindings();
+ render_view_host_->AllowBindings(BindingsPolicy::EXTENSION);
}
ExtensionHost::~ExtensionHost() {
@@ -196,12 +197,6 @@ void ExtensionHost::DidInsertCSS() {
#endif
}
-ExtensionFunctionDispatcher* ExtensionHost::
- CreateExtensionFunctionDispatcher(RenderViewHost *render_view_host,
- const std::string& extension_id) {
- return new ExtensionFunctionDispatcher(render_view_host, this, extension_id);
-}
-
RenderViewHostDelegate::View* ExtensionHost::GetViewDelegate() const {
// TODO(erikkay) this is unfortunate. The interface declares that this method
// must be const (no good reason for it as far as I can tell) which means you
@@ -303,3 +298,16 @@ Browser* ExtensionHost::GetBrowser() {
// is available. http://code.google.com/p/chromium/issues/detail?id=13284
return browser;
}
+
+void ExtensionHost::ProcessDOMUIMessage(const std::string& message,
+ const std::string& content,
+ int request_id,
+ bool has_callback) {
+ extension_function_dispatcher_->HandleRequest(message, content, request_id,
+ has_callback);
+}
+
+void ExtensionHost::RenderViewCreated(RenderViewHost* render_view_host) {
+ extension_function_dispatcher_.reset(
+ new ExtensionFunctionDispatcher(render_view_host_, this, url_));
+}
« no previous file with comments | « chrome/browser/extensions/extension_host.h ('k') | chrome/browser/extensions/extension_startup_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698