diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-16 23:54:40 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-16 23:54:40 +0000 |
commit | 15b2c6a9a738c3445d8525075a73f36dd8f2cdbc (patch) | |
tree | 657f19a459e124f71b2e45ab0a931c683706addc /chrome/browser/extensions/extension_message_handler.cc | |
parent | 1a10a0ccf708a6453d515706390966605b9ce83a (diff) | |
download | chromium_src-15b2c6a9a738c3445d8525075a73f36dd8f2cdbc.zip chromium_src-15b2c6a9a738c3445d8525075a73f36dd8f2cdbc.tar.gz chromium_src-15b2c6a9a738c3445d8525075a73f36dd8f2cdbc.tar.bz2 |
Move view_types.h from chrome to content. Although some of the enum types are Chrome specific, I don't see how we can keep this in chrome given that it's a return type in RenderViewHostDelegate. Also make the two IPCs that are sent with the view type and browser ID be extension messages, since that's the only receiver of the messages (and makes it clear why they're being sent).
Review URL: http://codereview.chromium.org/7034013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85564 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension_message_handler.cc')
-rw-r--r-- | chrome/browser/extensions/extension_message_handler.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/chrome/browser/extensions/extension_message_handler.cc b/chrome/browser/extensions/extension_message_handler.cc index 4447dac..6105b46 100644 --- a/chrome/browser/extensions/extension_message_handler.cc +++ b/chrome/browser/extensions/extension_message_handler.cc @@ -10,6 +10,7 @@ #include "content/browser/child_process_security_policy.h" #include "content/browser/renderer_host/render_process_host.h" #include "content/browser/renderer_host/render_view_host.h" +#include "content/browser/renderer_host/render_view_host_delegate.h" ExtensionMessageHandler::ExtensionMessageHandler( RenderViewHost* render_view_host) @@ -29,6 +30,13 @@ bool ExtensionMessageHandler::OnMessageReceived( return handled; } +void ExtensionMessageHandler::RenderViewHostInitialized() { + Send(new ExtensionMsg_NotifyRenderViewType( + routing_id(), render_view_host()->delegate()->GetRenderViewType())); + Send(new ExtensionMsg_UpdateBrowserWindowId( + routing_id(), render_view_host()->delegate()->GetBrowserWindowID())); +} + void ExtensionMessageHandler::OnPostMessage(int port_id, const std::string& message) { Profile* profile = render_view_host()->process()->profile(); |