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

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

Issue 801173002: Fix message routing for BrowserPlugin in iframe (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More cleanup Created 6 years 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
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_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/pickle.h" 10 #include "base/pickle.h"
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 void BrowserPluginGuest::SendMessageToEmbedder(IPC::Message* msg) { 388 void BrowserPluginGuest::SendMessageToEmbedder(IPC::Message* msg) {
389 if (!attached()) { 389 if (!attached()) {
390 // Some pages such as data URLs, javascript URLs, and about:blank 390 // Some pages such as data URLs, javascript URLs, and about:blank
391 // do not load external resources and so they load prior to attachment. 391 // do not load external resources and so they load prior to attachment.
392 // As a result, we must save all these IPCs until attachment and then 392 // As a result, we must save all these IPCs until attachment and then
393 // forward them so that the embedder gets a chance to see and process 393 // forward them so that the embedder gets a chance to see and process
394 // the load events. 394 // the load events.
395 pending_messages_.push_back(linked_ptr<IPC::Message>(msg)); 395 pending_messages_.push_back(linked_ptr<IPC::Message>(msg));
396 return; 396 return;
397 } 397 }
398 msg->set_routing_id(owner_web_contents_->GetRoutingID());
lazyboy 2014/12/16 23:57:30 The comment about this routing_id in browser_plugi
Charlie Reis 2014/12/17 00:06:44 What is it set to instead? (Is this still for rou
Fady Samuel 2014/12/17 19:30:35 These messages are control messages now. All Brows
Fady Samuel 2014/12/17 19:30:35 Done.
399 owner_web_contents_->Send(msg); 398 owner_web_contents_->Send(msg);
400 } 399 }
401 400
402 void BrowserPluginGuest::DragSourceEndedAt(int client_x, int client_y, 401 void BrowserPluginGuest::DragSourceEndedAt(int client_x, int client_y,
403 int screen_x, int screen_y, blink::WebDragOperation operation) { 402 int screen_x, int screen_y, blink::WebDragOperation operation) {
404 web_contents()->GetRenderViewHost()->DragSourceEndedAt(client_x, client_y, 403 web_contents()->GetRenderViewHost()->DragSourceEndedAt(client_x, client_y,
405 screen_x, screen_y, operation); 404 screen_x, screen_y, operation);
406 } 405 }
407 406
408 void BrowserPluginGuest::EndSystemDrag() { 407 void BrowserPluginGuest::EndSystemDrag() {
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after
846 void BrowserPluginGuest::OnImeCompositionRangeChanged( 845 void BrowserPluginGuest::OnImeCompositionRangeChanged(
847 const gfx::Range& range, 846 const gfx::Range& range,
848 const std::vector<gfx::Rect>& character_bounds) { 847 const std::vector<gfx::Rect>& character_bounds) {
849 static_cast<RenderWidgetHostViewBase*>( 848 static_cast<RenderWidgetHostViewBase*>(
850 web_contents()->GetRenderWidgetHostView())->ImeCompositionRangeChanged( 849 web_contents()->GetRenderWidgetHostView())->ImeCompositionRangeChanged(
851 range, character_bounds); 850 range, character_bounds);
852 } 851 }
853 #endif 852 #endif
854 853
855 } // namespace content 854 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698