OLD | NEW |
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_guest.h" | 5 #include "content/browser/browser_plugin/browser_plugin_guest.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 OnExecuteEditCommand) | 146 OnExecuteEditCommand) |
147 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_ExtendSelectionAndDelete, | 147 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_ExtendSelectionAndDelete, |
148 OnExtendSelectionAndDelete) | 148 OnExtendSelectionAndDelete) |
149 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_HandleInputEvent, | 149 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_HandleInputEvent, |
150 OnHandleInputEvent) | 150 OnHandleInputEvent) |
151 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_ImeConfirmComposition, | 151 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_ImeConfirmComposition, |
152 OnImeConfirmComposition) | 152 OnImeConfirmComposition) |
153 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_ImeSetComposition, | 153 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_ImeSetComposition, |
154 OnImeSetComposition) | 154 OnImeSetComposition) |
155 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_LockMouse_ACK, OnLockMouseAck) | 155 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_LockMouse_ACK, OnLockMouseAck) |
156 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_NavigateGuest, OnNavigateGuest) | |
157 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_PluginDestroyed, OnPluginDestroyed) | 156 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_PluginDestroyed, OnPluginDestroyed) |
158 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_ReclaimCompositorResources, | 157 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_ReclaimCompositorResources, |
159 OnReclaimCompositorResources) | 158 OnReclaimCompositorResources) |
160 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_ResizeGuest, OnResizeGuest) | 159 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_ResizeGuest, OnResizeGuest) |
161 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_SetAutoSize, OnSetSize) | 160 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_SetAutoSize, OnSetSize) |
162 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_SetEditCommandsForNextKeyEvent, | 161 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_SetEditCommandsForNextKeyEvent, |
163 OnSetEditCommandsForNextKeyEvent) | 162 OnSetEditCommandsForNextKeyEvent) |
164 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_SetFocus, OnSetFocus) | 163 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_SetFocus, OnSetFocus) |
165 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_SetContentsOpaque, | 164 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_SetContentsOpaque, |
166 OnSetContentsOpaque) | 165 OnSetContentsOpaque) |
167 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_SetVisibility, OnSetVisibility) | 166 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_SetVisibility, OnSetVisibility) |
168 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_UnlockMouse_ACK, OnUnlockMouseAck) | 167 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_UnlockMouse_ACK, OnUnlockMouseAck) |
169 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_UpdateGeometry, OnUpdateGeometry) | 168 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_UpdateGeometry, OnUpdateGeometry) |
170 IPC_MESSAGE_UNHANDLED(handled = false) | 169 IPC_MESSAGE_UNHANDLED(handled = false) |
171 IPC_END_MESSAGE_MAP() | 170 IPC_END_MESSAGE_MAP() |
172 return handled; | 171 return handled; |
173 } | 172 } |
174 | 173 |
175 void BrowserPluginGuest::Initialize( | 174 void BrowserPluginGuest::Initialize( |
176 const BrowserPluginHostMsg_Attach_Params& params, | 175 const BrowserPluginHostMsg_Attach_Params& params, |
177 WebContentsImpl* embedder_web_contents) { | 176 WebContentsImpl* embedder_web_contents, |
| 177 const base::DictionaryValue& extra_params) { |
| 178 printf("BPG::Initialize()\n"); |
178 focused_ = params.focused; | 179 focused_ = params.focused; |
179 guest_visible_ = params.visible; | 180 guest_visible_ = params.visible; |
180 guest_opaque_ = params.opaque; | 181 guest_opaque_ = params.opaque; |
181 guest_window_rect_ = params.resize_guest_params.view_rect; | 182 guest_window_rect_ = params.resize_guest_params.view_rect; |
182 | 183 |
183 auto_size_enabled_ = params.auto_size_params.enable; | 184 auto_size_enabled_ = params.auto_size_params.enable; |
184 max_auto_size_ = params.auto_size_params.max_size; | 185 max_auto_size_ = params.auto_size_params.max_size; |
185 min_auto_size_ = params.auto_size_params.min_size; | 186 min_auto_size_ = params.auto_size_params.min_size; |
186 | 187 |
187 // Once a BrowserPluginGuest has an embedder WebContents, it's considered to | 188 // Once a BrowserPluginGuest has an embedder WebContents, it's considered to |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 | 221 |
221 // Create a swapped out RenderView for the guest in the embedder render | 222 // Create a swapped out RenderView for the guest in the embedder render |
222 // process, so that the embedder can access the guest's window object. | 223 // process, so that the embedder can access the guest's window object. |
223 int guest_routing_id = | 224 int guest_routing_id = |
224 GetWebContents()->CreateSwappedOutRenderView( | 225 GetWebContents()->CreateSwappedOutRenderView( |
225 embedder_web_contents_->GetSiteInstance()); | 226 embedder_web_contents_->GetSiteInstance()); |
226 SendMessageToEmbedder( | 227 SendMessageToEmbedder( |
227 new BrowserPluginMsg_GuestContentWindowReady(instance_id_, | 228 new BrowserPluginMsg_GuestContentWindowReady(instance_id_, |
228 guest_routing_id)); | 229 guest_routing_id)); |
229 | 230 |
230 if (!params.src.empty()) { | |
231 // params.src will be validated in BrowserPluginGuest::OnNavigateGuest. | |
232 OnNavigateGuest(instance_id_, params.src); | |
233 has_render_view_ = true; | |
234 } | |
235 | |
236 WebPreferences prefs = GetWebContents()->GetWebkitPrefs(); | 231 WebPreferences prefs = GetWebContents()->GetWebkitPrefs(); |
237 prefs.navigate_on_drag_drop = false; | 232 prefs.navigate_on_drag_drop = false; |
238 GetWebContents()->GetRenderViewHost()->UpdateWebkitPreferences(prefs); | 233 GetWebContents()->GetRenderViewHost()->UpdateWebkitPreferences(prefs); |
239 | 234 |
240 // Enable input method for guest if it's enabled for the embedder. | 235 // Enable input method for guest if it's enabled for the embedder. |
241 if (static_cast<RenderViewHostImpl*>( | 236 if (static_cast<RenderViewHostImpl*>( |
242 embedder_web_contents_->GetRenderViewHost())->input_method_active()) { | 237 embedder_web_contents_->GetRenderViewHost())->input_method_active()) { |
243 RenderViewHostImpl* guest_rvh = static_cast<RenderViewHostImpl*>( | 238 RenderViewHostImpl* guest_rvh = static_cast<RenderViewHostImpl*>( |
244 GetWebContents()->GetRenderViewHost()); | 239 GetWebContents()->GetRenderViewHost()); |
245 guest_rvh->SetInputMethodActive(true); | 240 guest_rvh->SetInputMethodActive(true); |
246 } | 241 } |
247 | 242 |
248 // Inform the embedder of the guest's information. | 243 // Inform the embedder of the guest's attachment. |
249 // We pull the partition information from the site's URL, which is of the form | 244 SendMessageToEmbedder(new BrowserPluginMsg_Attach_ACK(instance_id_)); |
250 // guest://site/{persist}?{partition_name}. | |
251 const GURL& site_url = GetWebContents()->GetSiteInstance()->GetSiteURL(); | |
252 BrowserPluginMsg_Attach_ACK_Params ack_params; | |
253 ack_params.storage_partition_id = site_url.query(); | |
254 ack_params.persist_storage = | |
255 site_url.path().find("persist") != std::string::npos; | |
256 SendMessageToEmbedder( | |
257 new BrowserPluginMsg_Attach_ACK(instance_id_, ack_params)); | |
258 | 245 |
259 if (delegate_) | 246 if (delegate_) { |
260 delegate_->DidAttach(); | 247 delegate_->DidAttach(extra_params); |
| 248 has_render_view_ = true; |
| 249 } |
261 } | 250 } |
262 | 251 |
263 BrowserPluginGuest::~BrowserPluginGuest() { | 252 BrowserPluginGuest::~BrowserPluginGuest() { |
264 while (!pending_messages_.empty()) { | |
265 delete pending_messages_.front(); | |
266 pending_messages_.pop(); | |
267 } | |
268 } | 253 } |
269 | 254 |
270 // static | 255 // static |
271 BrowserPluginGuest* BrowserPluginGuest::Create( | 256 BrowserPluginGuest* BrowserPluginGuest::Create( |
272 int instance_id, | 257 int instance_id, |
273 SiteInstance* guest_site_instance, | 258 SiteInstance* guest_site_instance, |
274 WebContentsImpl* web_contents, | 259 WebContentsImpl* web_contents, |
275 scoped_ptr<base::DictionaryValue> extra_params, | 260 scoped_ptr<base::DictionaryValue> extra_params, |
276 BrowserPluginGuest* opener) { | 261 BrowserPluginGuest* opener) { |
277 RecordAction(base::UserMetricsAction("BrowserPlugin.Guest.Create")); | 262 RecordAction(base::UserMetricsAction("BrowserPlugin.Guest.Create")); |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
381 size.height() <= max_auto_size_.height(); | 366 size.height() <= max_auto_size_.height(); |
382 } | 367 } |
383 | 368 |
384 void BrowserPluginGuest::SendMessageToEmbedder(IPC::Message* msg) { | 369 void BrowserPluginGuest::SendMessageToEmbedder(IPC::Message* msg) { |
385 if (!attached()) { | 370 if (!attached()) { |
386 // Some pages such as data URLs, javascript URLs, and about:blank | 371 // Some pages such as data URLs, javascript URLs, and about:blank |
387 // do not load external resources and so they load prior to attachment. | 372 // do not load external resources and so they load prior to attachment. |
388 // As a result, we must save all these IPCs until attachment and then | 373 // As a result, we must save all these IPCs until attachment and then |
389 // forward them so that the embedder gets a chance to see and process | 374 // forward them so that the embedder gets a chance to see and process |
390 // the load events. | 375 // the load events. |
391 pending_messages_.push(msg); | 376 pending_messages_.push_back(linked_ptr<IPC::Message>(msg)); |
392 return; | 377 return; |
393 } | 378 } |
394 msg->set_routing_id(embedder_web_contents_->GetRoutingID()); | 379 msg->set_routing_id(embedder_web_contents_->GetRoutingID()); |
395 embedder_web_contents_->Send(msg); | 380 embedder_web_contents_->Send(msg); |
396 } | 381 } |
397 | 382 |
398 void BrowserPluginGuest::DragSourceEndedAt(int client_x, int client_y, | 383 void BrowserPluginGuest::DragSourceEndedAt(int client_x, int client_y, |
399 int screen_x, int screen_y, blink::WebDragOperation operation) { | 384 int screen_x, int screen_y, blink::WebDragOperation operation) { |
400 web_contents()->GetRenderViewHost()->DragSourceEndedAt(client_x, client_y, | 385 web_contents()->GetRenderViewHost()->DragSourceEndedAt(client_x, client_y, |
401 screen_x, screen_y, operation); | 386 screen_x, screen_y, operation); |
402 } | 387 } |
403 | 388 |
404 void BrowserPluginGuest::EndSystemDrag() { | 389 void BrowserPluginGuest::EndSystemDrag() { |
405 RenderViewHostImpl* guest_rvh = static_cast<RenderViewHostImpl*>( | 390 RenderViewHostImpl* guest_rvh = static_cast<RenderViewHostImpl*>( |
406 GetWebContents()->GetRenderViewHost()); | 391 GetWebContents()->GetRenderViewHost()); |
407 guest_rvh->DragSourceSystemDragEnded(); | 392 guest_rvh->DragSourceSystemDragEnded(); |
408 } | 393 } |
409 | 394 |
410 void BrowserPluginGuest::SetDelegate(BrowserPluginGuestDelegate* delegate) { | 395 void BrowserPluginGuest::SetDelegate(BrowserPluginGuestDelegate* delegate) { |
411 DCHECK(!delegate_); | 396 DCHECK(!delegate_); |
412 delegate_.reset(delegate); | 397 delegate_.reset(delegate); |
413 } | 398 } |
414 | 399 |
415 void BrowserPluginGuest::SendQueuedMessages() { | 400 void BrowserPluginGuest::SendQueuedMessages() { |
416 if (!attached()) | 401 if (!attached()) |
417 return; | 402 return; |
418 | 403 |
419 while (!pending_messages_.empty()) { | 404 while (!pending_messages_.empty()) { |
420 IPC::Message* message = pending_messages_.front(); | 405 linked_ptr<IPC::Message> message_ptr = pending_messages_.front(); |
421 pending_messages_.pop(); | 406 pending_messages_.pop_front(); |
422 SendMessageToEmbedder(message); | 407 SendMessageToEmbedder(message_ptr.release()); |
423 } | 408 } |
424 } | 409 } |
425 | 410 |
426 void BrowserPluginGuest::DidCommitProvisionalLoadForFrame( | 411 void BrowserPluginGuest::DidCommitProvisionalLoadForFrame( |
427 int64 frame_id, | 412 int64 frame_id, |
428 const base::string16& frame_unique_name, | 413 const base::string16& frame_unique_name, |
429 bool is_main_frame, | 414 bool is_main_frame, |
430 const GURL& url, | 415 const GURL& url, |
431 PageTransition transition_type, | 416 PageTransition transition_type, |
432 RenderViewHost* render_view_host) { | 417 RenderViewHost* render_view_host) { |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
490 switch (message.type()) { | 475 switch (message.type()) { |
491 case BrowserPluginHostMsg_CompositorFrameSwappedACK::ID: | 476 case BrowserPluginHostMsg_CompositorFrameSwappedACK::ID: |
492 case BrowserPluginHostMsg_CopyFromCompositingSurfaceAck::ID: | 477 case BrowserPluginHostMsg_CopyFromCompositingSurfaceAck::ID: |
493 case BrowserPluginHostMsg_DragStatusUpdate::ID: | 478 case BrowserPluginHostMsg_DragStatusUpdate::ID: |
494 case BrowserPluginHostMsg_ExecuteEditCommand::ID: | 479 case BrowserPluginHostMsg_ExecuteEditCommand::ID: |
495 case BrowserPluginHostMsg_ExtendSelectionAndDelete::ID: | 480 case BrowserPluginHostMsg_ExtendSelectionAndDelete::ID: |
496 case BrowserPluginHostMsg_HandleInputEvent::ID: | 481 case BrowserPluginHostMsg_HandleInputEvent::ID: |
497 case BrowserPluginHostMsg_ImeConfirmComposition::ID: | 482 case BrowserPluginHostMsg_ImeConfirmComposition::ID: |
498 case BrowserPluginHostMsg_ImeSetComposition::ID: | 483 case BrowserPluginHostMsg_ImeSetComposition::ID: |
499 case BrowserPluginHostMsg_LockMouse_ACK::ID: | 484 case BrowserPluginHostMsg_LockMouse_ACK::ID: |
500 case BrowserPluginHostMsg_NavigateGuest::ID: | |
501 case BrowserPluginHostMsg_PluginDestroyed::ID: | 485 case BrowserPluginHostMsg_PluginDestroyed::ID: |
502 case BrowserPluginHostMsg_ReclaimCompositorResources::ID: | 486 case BrowserPluginHostMsg_ReclaimCompositorResources::ID: |
503 case BrowserPluginHostMsg_ResizeGuest::ID: | 487 case BrowserPluginHostMsg_ResizeGuest::ID: |
504 case BrowserPluginHostMsg_SetAutoSize::ID: | 488 case BrowserPluginHostMsg_SetAutoSize::ID: |
505 case BrowserPluginHostMsg_SetEditCommandsForNextKeyEvent::ID: | 489 case BrowserPluginHostMsg_SetEditCommandsForNextKeyEvent::ID: |
506 case BrowserPluginHostMsg_SetFocus::ID: | 490 case BrowserPluginHostMsg_SetFocus::ID: |
507 case BrowserPluginHostMsg_SetContentsOpaque::ID: | 491 case BrowserPluginHostMsg_SetContentsOpaque::ID: |
508 case BrowserPluginHostMsg_SetVisibility::ID: | 492 case BrowserPluginHostMsg_SetVisibility::ID: |
509 case BrowserPluginHostMsg_UnlockMouse_ACK::ID: | 493 case BrowserPluginHostMsg_UnlockMouse_ACK::ID: |
510 case BrowserPluginHostMsg_UpdateGeometry::ID: | 494 case BrowserPluginHostMsg_UpdateGeometry::ID: |
(...skipping 28 matching lines...) Expand all Loading... |
539 #endif | 523 #endif |
540 IPC_MESSAGE_HANDLER(ViewHostMsg_UnlockMouse, OnUnlockMouse) | 524 IPC_MESSAGE_HANDLER(ViewHostMsg_UnlockMouse, OnUnlockMouse) |
541 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateRect, OnUpdateRect) | 525 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateRect, OnUpdateRect) |
542 IPC_MESSAGE_UNHANDLED(handled = false) | 526 IPC_MESSAGE_UNHANDLED(handled = false) |
543 IPC_END_MESSAGE_MAP() | 527 IPC_END_MESSAGE_MAP() |
544 return handled; | 528 return handled; |
545 } | 529 } |
546 | 530 |
547 void BrowserPluginGuest::Attach( | 531 void BrowserPluginGuest::Attach( |
548 WebContentsImpl* embedder_web_contents, | 532 WebContentsImpl* embedder_web_contents, |
549 BrowserPluginHostMsg_Attach_Params params, | 533 const BrowserPluginHostMsg_Attach_Params& params, |
550 const base::DictionaryValue& extra_params) { | 534 const base::DictionaryValue& extra_params) { |
551 if (attached()) | 535 if (attached()) |
552 return; | 536 return; |
553 | 537 |
554 // Clear parameters that get inherited from the opener. | |
555 params.storage_partition_id.clear(); | |
556 params.persist_storage = false; | |
557 params.src.clear(); | |
558 | |
559 // If a RenderView has already been created for this new window, then we need | 538 // If a RenderView has already been created for this new window, then we need |
560 // to initialize the browser-side state now so that the RenderFrameHostManager | 539 // to initialize the browser-side state now so that the RenderFrameHostManager |
561 // does not create a new RenderView on navigation. | 540 // does not create a new RenderView on navigation. |
562 if (has_render_view_) { | 541 if (has_render_view_) { |
563 static_cast<RenderViewHostImpl*>( | 542 static_cast<RenderViewHostImpl*>( |
564 GetWebContents()->GetRenderViewHost())->Init(); | 543 GetWebContents()->GetRenderViewHost())->Init(); |
565 WebContentsViewGuest* new_view = | 544 WebContentsViewGuest* new_view = |
566 static_cast<WebContentsViewGuest*>(GetWebContents()->GetView()); | 545 static_cast<WebContentsViewGuest*>(GetWebContents()->GetView()); |
567 new_view->CreateViewForWidget(web_contents()->GetRenderViewHost()); | 546 new_view->CreateViewForWidget(web_contents()->GetRenderViewHost()); |
568 } | 547 } |
569 | 548 |
570 Initialize(params, embedder_web_contents); | 549 Initialize(params, embedder_web_contents, extra_params); |
571 | 550 |
572 SendQueuedMessages(); | 551 SendQueuedMessages(); |
573 | 552 |
574 RecordAction(base::UserMetricsAction("BrowserPlugin.Guest.Attached")); | 553 RecordAction(base::UserMetricsAction("BrowserPlugin.Guest.Attached")); |
575 } | 554 } |
576 | 555 |
577 void BrowserPluginGuest::OnCompositorFrameSwappedACK( | 556 void BrowserPluginGuest::OnCompositorFrameSwappedACK( |
578 int instance_id, | 557 int instance_id, |
579 const FrameHostMsg_CompositorFrameSwappedACK_Params& params) { | 558 const FrameHostMsg_CompositorFrameSwappedACK_Params& params) { |
580 RenderWidgetHostImpl::SendSwapCompositorFrameAck(params.producing_route_id, | 559 RenderWidgetHostImpl::SendSwapCompositorFrameAck(params.producing_route_id, |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
733 weak_ptr_factory_.GetWeakPtr())); | 712 weak_ptr_factory_.GetWeakPtr())); |
734 } | 713 } |
735 | 714 |
736 void BrowserPluginGuest::OnLockMouseAck(int instance_id, bool succeeded) { | 715 void BrowserPluginGuest::OnLockMouseAck(int instance_id, bool succeeded) { |
737 Send(new ViewMsg_LockMouse_ACK(routing_id(), succeeded)); | 716 Send(new ViewMsg_LockMouse_ACK(routing_id(), succeeded)); |
738 pending_lock_request_ = false; | 717 pending_lock_request_ = false; |
739 if (succeeded) | 718 if (succeeded) |
740 mouse_locked_ = true; | 719 mouse_locked_ = true; |
741 } | 720 } |
742 | 721 |
743 void BrowserPluginGuest::OnNavigateGuest(int instance_id, | |
744 const std::string& src) { | |
745 if (!delegate_) | |
746 return; | |
747 delegate_->NavigateGuest(src); | |
748 } | |
749 | |
750 void BrowserPluginGuest::OnPluginDestroyed(int instance_id) { | 722 void BrowserPluginGuest::OnPluginDestroyed(int instance_id) { |
751 Destroy(); | 723 Destroy(); |
752 } | 724 } |
753 | 725 |
754 void BrowserPluginGuest::OnResizeGuest( | 726 void BrowserPluginGuest::OnResizeGuest( |
755 int instance_id, | 727 int instance_id, |
756 const BrowserPluginHostMsg_ResizeGuest_Params& params) { | 728 const BrowserPluginHostMsg_ResizeGuest_Params& params) { |
757 if (!params.size_changed) | 729 if (!params.size_changed) |
758 return; | 730 return; |
759 // BrowserPlugin manages resize flow control itself and does not depend | 731 // BrowserPlugin manages resize flow control itself and does not depend |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
969 void BrowserPluginGuest::OnImeCompositionRangeChanged( | 941 void BrowserPluginGuest::OnImeCompositionRangeChanged( |
970 const gfx::Range& range, | 942 const gfx::Range& range, |
971 const std::vector<gfx::Rect>& character_bounds) { | 943 const std::vector<gfx::Rect>& character_bounds) { |
972 static_cast<RenderWidgetHostViewBase*>( | 944 static_cast<RenderWidgetHostViewBase*>( |
973 web_contents()->GetRenderWidgetHostView())->ImeCompositionRangeChanged( | 945 web_contents()->GetRenderWidgetHostView())->ImeCompositionRangeChanged( |
974 range, character_bounds); | 946 range, character_bounds); |
975 } | 947 } |
976 #endif | 948 #endif |
977 | 949 |
978 } // namespace content | 950 } // namespace content |
OLD | NEW |