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

Unified Diff: content/browser/renderer_host/render_view_host_impl.cc

Issue 10377170: Browser Plugin: browser process side changes (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Updated according to creis@ Created 8 years, 7 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: content/browser/renderer_host/render_view_host_impl.cc
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
index ab06cd6411373540c21ef61fdfa29595d496c316..a88f8f6d08a95572a980e7c413715239f6d446c6 100644
--- a/content/browser/renderer_host/render_view_host_impl.cc
+++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -30,6 +30,7 @@
#include "content/browser/power_save_blocker.h"
#include "content/browser/renderer_host/render_process_host_impl.h"
#include "content/common/accessibility_messages.h"
+#include "content/common/browser_plugin_messages.h"
#include "content/common/desktop_notification_messages.h"
#include "content/common/drag_messages.h"
#include "content/common/inter_process_time_ticks_converter.h"
@@ -56,6 +57,7 @@
#include "content/public/common/result_codes.h"
#include "content/public/common/selected_file_info.h"
#include "content/public/common/url_constants.h"
+#include "ipc/ipc_channel_handle.h"
#include "net/base/net_util.h"
#include "net/url_request/url_request_context_getter.h"
#include "third_party/skia/include/core/SkBitmap.h"
@@ -258,9 +260,10 @@ bool RenderViewHostImpl::CreateRenderView(const string16& frame_name,
gfx::NativeViewFromId(GetNativeViewId()));
#endif
- if (embedder_process_id != -1)
+ if (embedder_process_id != -1) {
params.embedder_channel_name =
StringPrintf("%d.r%d", GetProcess()->GetID(), embedder_process_id);
+ }
params.accessibility_mode =
BrowserAccessibilityState::GetInstance()->IsAccessibleBrowser() ?
@@ -921,6 +924,11 @@ bool RenderViewHostImpl::OnMessageReceived(const IPC::Message& msg) {
OnDomOperationResponse)
IPC_MESSAGE_HANDLER(AccessibilityHostMsg_Notifications,
OnAccessibilityNotifications)
+ IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_ConnectToChannel,
+ OnConnectToChannel)
+ IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_NavigateFromEmbedder,
+ OnNavigateGuestFromEmbedder)
+ IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_ResizeGuest, OnResizeGuest)
// Have the super handle all other messages.
IPC_MESSAGE_UNHANDLED(
handled = RenderWidgetHostImpl::OnMessageReceived(msg))
@@ -1828,6 +1836,29 @@ void RenderViewHostImpl::OnDomOperationResponse(
content::Details<DomOperationNotificationDetails>(&details));
}
+void RenderViewHostImpl::OnConnectToChannel(
+ const IPC::ChannelHandle& channel_handle) {
+ delegate_->ConnectEmbedderToChannel(this, channel_handle);
+}
+
+void RenderViewHostImpl::OnNavigateGuestFromEmbedder(int32 instance_id,
+ long long frame_id,
+ const std::string& src,
+ const gfx::Size& size) {
+ delegate_->NavigateGuestFromEmbedder(
+ this,
+ instance_id,
+ frame_id,
+ src,
+ size);
+}
+
+void RenderViewHostImpl::OnResizeGuest(int width, int height) {
+ DCHECK(GetView());
+ GetView()->SetSize(gfx::Size(width, height));
+}
+
+
void RenderViewHostImpl::SetSwappedOut(bool is_swapped_out) {
is_swapped_out_ = is_swapped_out;

Powered by Google App Engine
This is Rietveld 408576698