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/pickle.h" | 10 #include "base/pickle.h" |
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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()); | |
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 Loading... |
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 |
OLD | NEW |