| 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/string_util.h" | 9 #include "base/string_util.h" |
| 10 #include "content/browser/browser_plugin/browser_plugin_embedder.h" | 10 #include "content/browser/browser_plugin/browser_plugin_embedder.h" |
| (...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 380 focused_ = focused; | 380 focused_ = focused; |
| 381 RenderViewHost* render_view_host = web_contents()->GetRenderViewHost(); | 381 RenderViewHost* render_view_host = web_contents()->GetRenderViewHost(); |
| 382 render_view_host->Send( | 382 render_view_host->Send( |
| 383 new ViewMsg_SetFocus(render_view_host->GetRoutingID(), focused)); | 383 new ViewMsg_SetFocus(render_view_host->GetRoutingID(), focused)); |
| 384 } | 384 } |
| 385 | 385 |
| 386 void BrowserPluginGuest::ShowWidget(RenderViewHost* render_view_host, | 386 void BrowserPluginGuest::ShowWidget(RenderViewHost* render_view_host, |
| 387 int route_id, | 387 int route_id, |
| 388 const gfx::Rect& initial_pos) { | 388 const gfx::Rect& initial_pos) { |
| 389 gfx::Rect screen_pos(initial_pos); | 389 gfx::Rect screen_pos(initial_pos); |
| 390 screen_pos.Offset(guest_rect_.origin()); | 390 screen_pos.Offset(guest_rect_.OffsetFromOrigin()); |
| 391 static_cast<WebContentsImpl*>(web_contents())->ShowCreatedWidget(route_id, | 391 static_cast<WebContentsImpl*>(web_contents())->ShowCreatedWidget(route_id, |
| 392 screen_pos); | 392 screen_pos); |
| 393 } | 393 } |
| 394 | 394 |
| 395 void BrowserPluginGuest::SetCursor(const WebCursor& cursor) { | 395 void BrowserPluginGuest::SetCursor(const WebCursor& cursor) { |
| 396 cursor_ = cursor; | 396 cursor_ = cursor; |
| 397 } | 397 } |
| 398 | 398 |
| 399 void BrowserPluginGuest::DidStartProvisionalLoadForFrame( | 399 void BrowserPluginGuest::DidStartProvisionalLoadForFrame( |
| 400 int64 frame_id, | 400 int64 frame_id, |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 503 default: | 503 default: |
| 504 break; | 504 break; |
| 505 } | 505 } |
| 506 } | 506 } |
| 507 | 507 |
| 508 void BrowserPluginGuest::SendMessageToEmbedder(IPC::Message* msg) { | 508 void BrowserPluginGuest::SendMessageToEmbedder(IPC::Message* msg) { |
| 509 embedder_web_contents_->GetRenderProcessHost()->Send(msg); | 509 embedder_web_contents_->GetRenderProcessHost()->Send(msg); |
| 510 } | 510 } |
| 511 | 511 |
| 512 } // namespace content | 512 } // namespace content |
| OLD | NEW |