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

Side by Side Diff: content/renderer/browser_plugin/guest_to_embedder_channel.cc

Issue 10546117: Browser Plugin: Make basic focus in guests work (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Fixed broken win_rel: avoid implicit cast Created 8 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/renderer/browser_plugin/guest_to_embedder_channel.h" 5 #include "content/renderer/browser_plugin/guest_to_embedder_channel.h"
6 6
7 #include "base/process_util.h" 7 #include "base/process_util.h"
8 #include "content/common/browser_plugin_messages.h" 8 #include "content/common/browser_plugin_messages.h"
9 #include "content/common/child_process.h" 9 #include "content/common/child_process.h"
10 #include "content/renderer/browser_plugin/browser_plugin_channel_manager.h" 10 #include "content/renderer/browser_plugin/browser_plugin_channel_manager.h"
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 render_view->Send( 240 render_view->Send(
241 new BrowserPluginHostMsg_ResizeGuest( 241 new BrowserPluginHostMsg_ResizeGuest(
242 render_view->GetRoutingID(), 242 render_view->GetRoutingID(),
243 new_data.rect.size.width, 243 new_data.rect.size.width,
244 new_data.rect.size.height)); 244 new_data.rect.size.height));
245 } 245 }
246 } 246 }
247 247
248 void GuestToEmbedderChannel::OnDidChangeFocus(PP_Instance instance, 248 void GuestToEmbedderChannel::OnDidChangeFocus(PP_Instance instance,
249 PP_Bool has_focus) { 249 PP_Bool has_focus) {
250 NOTIMPLEMENTED(); 250 InstanceMap::iterator it = render_view_instances_.find(instance);
251 if (it == render_view_instances_.end())
252 return;
253 RenderViewImpl* render_view = it->second;
254 render_view->GetWebView()->setFocus(PP_ToBool(has_focus));
251 } 255 }
252 256
253 void GuestToEmbedderChannel::OnHandleMessage( 257 void GuestToEmbedderChannel::OnHandleMessage(
254 PP_Instance instance, 258 PP_Instance instance,
255 ppapi::proxy::SerializedVarReceiveInput message_data) { 259 ppapi::proxy::SerializedVarReceiveInput message_data) {
256 InstanceMap::iterator it = render_view_instances_.find(instance); 260 InstanceMap::iterator it = render_view_instances_.find(instance);
257 if (it == render_view_instances_.end()) 261 if (it == render_view_instances_.end())
258 return; 262 return;
259 263
260 PP_Var received_var(message_data.Get(this)); 264 PP_Var received_var(message_data.Get(this));
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 render_view->GetWebView()->loseCompositorContext(1); 297 render_view->GetWebView()->loseCompositorContext(1);
294 } 298 }
295 299
296 void GuestToEmbedderChannel::OnGuestReady(PP_Instance instance, 300 void GuestToEmbedderChannel::OnGuestReady(PP_Instance instance,
297 int embedder_container_id) { 301 int embedder_container_id) {
298 RenderThreadImpl::current()->browser_plugin_channel_manager()-> 302 RenderThreadImpl::current()->browser_plugin_channel_manager()->
299 GuestReady(instance, embedder_channel_name(), embedder_container_id); 303 GuestReady(instance, embedder_channel_name(), embedder_container_id);
300 } 304 }
301 305
302 } // namespace content 306 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698