diff options
author | acolwell@chromium.org <acolwell@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-27 17:23:24 +0000 |
---|---|---|
committer | acolwell@chromium.org <acolwell@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-27 17:23:24 +0000 |
commit | 16544bdf5b6500a7390d738a46f3cff017590582 (patch) | |
tree | a497bac31ca891c82fb2f656bd969feac8650d41 /chrome/browser/tab_contents/background_contents.cc | |
parent | 5ce7a3eebe8ccb16f1cd1e04fbcfa1c7c2d9fdf2 (diff) | |
download | chromium_src-16544bdf5b6500a7390d738a46f3cff017590582.zip chromium_src-16544bdf5b6500a7390d738a46f3cff017590582.tar.gz chromium_src-16544bdf5b6500a7390d738a46f3cff017590582.tar.bz2 |
Revert 83168 - Revert "Revert 83100 - Remove weird dependency on extensions from webui.Re-plumb extension request messages in a more sane way.Before, each RVH had ProcessWebUIMessage(), which wasserving as a manual way of plumbing both WebUI andextension messages to the right place, even though onlya few RVHD responded to either message.Instead of this, we now just teach more of the stack howto handle IPC messages in general, and delegate them upthrough the stack, giving each layer a chance to handlethem if it knows how.The result is simpler and smaller:179 insertions(+), 252 deletions(-)BUG=80311Review URL: http://codereview.chromium.org/6901021"This reverts commit 643b280cedd9f0b76948686f39f50f295aba362f.TBR=mpcomplete@chromium.org
TBR=aa@chromium.org
This is still causing check_deps failures.
Review URL: http://codereview.chromium.org/6902074
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83172 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tab_contents/background_contents.cc')
-rw-r--r-- | chrome/browser/tab_contents/background_contents.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/chrome/browser/tab_contents/background_contents.cc b/chrome/browser/tab_contents/background_contents.cc index e5f98b8..c994fad 100644 --- a/chrome/browser/tab_contents/background_contents.cc +++ b/chrome/browser/tab_contents/background_contents.cc @@ -10,6 +10,7 @@ #include "chrome/browser/renderer_preferences_util.h" #include "chrome/browser/ui/webui/chrome_web_ui_factory.h" #include "chrome/common/extensions/extension_constants.h" +#include "chrome/common/extensions/extension_messages.h" #include "chrome/common/url_constants.h" #include "chrome/common/view_types.h" #include "content/browser/browsing_instance.h" @@ -207,6 +208,15 @@ WebPreferences BackgroundContents::GetWebkitPrefs() { false); // is_web_ui } +void BackgroundContents::ProcessWebUIMessage( + const ExtensionHostMsg_DomMessage_Params& params) { + // TODO(rafaelw): It may make sense for extensions to be able to open + // BackgroundContents to chrome-extension://<id> pages. Consider implementing. + render_view_host_->Send(new ExtensionMsg_Response( + render_view_host_->routing_id(), params.request_id, false, + std::string(), "Access to extension API denied.")); +} + void BackgroundContents::CreateNewWindow( int route_id, const ViewHostMsg_CreateWindow_Params& params) { |