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

Unified Diff: extensions/browser/extension_message_filter.cc

Issue 376033002: Adding MimeHandlerView. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pending-zork-patch2
Patch Set: With the new attach approach Created 6 years, 4 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
Index: extensions/browser/extension_message_filter.cc
diff --git a/extensions/browser/extension_message_filter.cc b/extensions/browser/extension_message_filter.cc
index 7529fd02ae427d8c51390618bc958af7af1a5fe6..dd807aa7aaf09f88538e365c05b72a7a1ed7cf7e 100644
--- a/extensions/browser/extension_message_filter.cc
+++ b/extensions/browser/extension_message_filter.cc
@@ -46,6 +46,7 @@ void ExtensionMessageFilter::OverrideThreadForMessage(
case ExtensionHostMsg_AttachGuest::ID:
case ExtensionHostMsg_RemoveListener::ID:
case ExtensionHostMsg_AddLazyListener::ID:
+ case ExtensionHostMsg_CreateMimeHandlerViewGuest::ID:
case ExtensionHostMsg_RemoveLazyListener::ID:
case ExtensionHostMsg_AddFilteredListener::ID:
case ExtensionHostMsg_RemoveFilteredListener::ID:
@@ -76,6 +77,8 @@ bool ExtensionMessageFilter::OnMessageReceived(const IPC::Message& message) {
OnExtensionAddLazyListener)
IPC_MESSAGE_HANDLER(ExtensionHostMsg_AttachGuest,
OnExtensionAttachGuest)
+ IPC_MESSAGE_HANDLER(ExtensionHostMsg_CreateMimeHandlerViewGuest,
+ OnExtensionCreateMimeHandlerViewGuest)
IPC_MESSAGE_HANDLER(ExtensionHostMsg_RemoveLazyListener,
OnExtensionRemoveLazyListener)
IPC_MESSAGE_HANDLER(ExtensionHostMsg_AddFilteredListener,
@@ -167,6 +170,21 @@ void ExtensionMessageFilter::OnExtensionAttachGuest(
params);
}
+void ExtensionMessageFilter::OnExtensionCreateMimeHandlerViewGuest(
+ int render_frame_id,
+ const std::string& embedder_url,
+ const std::string& mime_type,
+ int element_instance_id) {
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ extensions::GuestViewManager* manager =
+ extensions::GuestViewManager::FromBrowserContext(browser_context_);
+ manager->CreateMimeHandlerViewGuest(render_process_id_,
Fady Samuel 2014/08/29 18:52:32 Do we have to create a new method in GuestViewMana
lazyboy 2014/08/29 22:08:25 I've moved the creation code here.
+ render_frame_id,
+ embedder_url,
+ mime_type,
+ element_instance_id);
+}
+
void ExtensionMessageFilter::OnExtensionRemoveLazyListener(
const std::string& extension_id, const std::string& event_name) {
EventRouter* router = EventRouter::Get(browser_context_);

Powered by Google App Engine
This is Rietveld 408576698