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

Side by Side Diff: content/browser/browser_plugin/browser_plugin_embedder_helper.cc

Issue 11364133: Messages needed for webview compositor communication. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Reduced scope, fixed comments. Created 8 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/browser_plugin/browser_plugin_embedder_helper.h" 5 #include "content/browser/browser_plugin/browser_plugin_embedder_helper.h"
6 6
7 #include "content/browser/browser_plugin/browser_plugin_embedder.h" 7 #include "content/browser/browser_plugin/browser_plugin_embedder.h"
8 #include "content/browser/renderer_host/render_view_host_impl.h" 8 #include "content/browser/renderer_host/render_view_host_impl.h"
9 #include "content/common/browser_plugin_messages.h" 9 #include "content/common/browser_plugin_messages.h"
10 #include "content/common/view_messages.h" 10 #include "content/common/view_messages.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_PluginDestroyed, 46 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_PluginDestroyed,
47 OnPluginDestroyed); 47 OnPluginDestroyed);
48 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_Go, OnGo) 48 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_Go, OnGo)
49 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_Stop, OnStop) 49 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_Stop, OnStop)
50 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_Reload, OnReload) 50 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_Reload, OnReload)
51 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_TerminateGuest, OnTerminateGuest) 51 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_TerminateGuest, OnTerminateGuest)
52 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_SetVisibility, 52 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_SetVisibility,
53 OnSetGuestVisibility) 53 OnSetGuestVisibility)
54 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_DragStatusUpdate, 54 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_DragStatusUpdate,
55 OnDragStatusUpdate) 55 OnDragStatusUpdate)
56 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_BuffersSwappedACK,
57 OnSwapBuffersACK)
56 IPC_MESSAGE_UNHANDLED(handled = false) 58 IPC_MESSAGE_UNHANDLED(handled = false)
57 IPC_END_MESSAGE_MAP() 59 IPC_END_MESSAGE_MAP()
58 return handled; 60 return handled;
59 } 61 }
60 62
61 void BrowserPluginEmbedderHelper::OnResizeGuest( 63 void BrowserPluginEmbedderHelper::OnResizeGuest(
62 int instance_id, 64 int instance_id,
63 const BrowserPluginHostMsg_ResizeGuest_Params& params) { 65 const BrowserPluginHostMsg_ResizeGuest_Params& params) {
64 embedder_->ResizeGuest(render_view_host(), instance_id, params); 66 embedder_->ResizeGuest(render_view_host(), instance_id, params);
65 } 67 }
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 src, 126 src,
125 resize_params); 127 resize_params);
126 } 128 }
127 129
128 void BrowserPluginEmbedderHelper::OnUpdateRectACK(int instance_id, 130 void BrowserPluginEmbedderHelper::OnUpdateRectACK(int instance_id,
129 int message_id, 131 int message_id,
130 const gfx::Size& size) { 132 const gfx::Size& size) {
131 embedder_->UpdateRectACK(instance_id, message_id, size); 133 embedder_->UpdateRectACK(instance_id, message_id, size);
132 } 134 }
133 135
136 void BrowserPluginEmbedderHelper::OnSwapBuffersACK(int route_id,
137 int gpu_host_id,
138 uint32 sync_point) {
139 RenderWidgetHostImpl::AcknowledgeBufferPresent(route_id,
140 gpu_host_id,
141 true,
142 sync_point);
143 }
144
134 void BrowserPluginEmbedderHelper::OnSetFocus(int instance_id, bool focused) { 145 void BrowserPluginEmbedderHelper::OnSetFocus(int instance_id, bool focused) {
135 embedder_->SetFocus(instance_id, focused); 146 embedder_->SetFocus(instance_id, focused);
136 } 147 }
137 148
138 void BrowserPluginEmbedderHelper::OnPluginDestroyed(int instance_id) { 149 void BrowserPluginEmbedderHelper::OnPluginDestroyed(int instance_id) {
139 embedder_->PluginDestroyed(instance_id); 150 embedder_->PluginDestroyed(instance_id);
140 } 151 }
141 152
142 void BrowserPluginEmbedderHelper::OnGo(int instance_id, int relative_index) { 153 void BrowserPluginEmbedderHelper::OnGo(int instance_id, int relative_index) {
143 embedder_->Go(instance_id, relative_index); 154 embedder_->Go(instance_id, relative_index);
(...skipping 20 matching lines...) Expand all
164 int instance_id, 175 int instance_id,
165 WebKit::WebDragStatus drag_status, 176 WebKit::WebDragStatus drag_status,
166 const WebDropData& drop_data, 177 const WebDropData& drop_data,
167 WebKit::WebDragOperationsMask drag_mask, 178 WebKit::WebDragOperationsMask drag_mask,
168 const gfx::Point& location) { 179 const gfx::Point& location) {
169 embedder_->DragStatusUpdate(instance_id, drag_status, drop_data, drag_mask, 180 embedder_->DragStatusUpdate(instance_id, drag_status, drop_data, drag_mask,
170 location); 181 location);
171 } 182 }
172 183
173 } // namespace content 184 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698