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 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
458 } | 458 } |
459 | 459 |
460 bool BrowserPluginGuest::StopFinding(StopFindAction action) { | 460 bool BrowserPluginGuest::StopFinding(StopFindAction action) { |
461 return delegate_->StopFinding(action); | 461 return delegate_->StopFinding(action); |
462 } | 462 } |
463 | 463 |
464 WebContentsImpl* BrowserPluginGuest::GetWebContents() const { | 464 WebContentsImpl* BrowserPluginGuest::GetWebContents() const { |
465 return static_cast<WebContentsImpl*>(web_contents()); | 465 return static_cast<WebContentsImpl*>(web_contents()); |
466 } | 466 } |
467 | 467 |
| 468 void BrowserPluginGuest::SendScrollCompletion(bool handled) { |
| 469 DCHECK(attached() && owner_web_contents_); |
| 470 SendMessageToEmbedder( |
| 471 new BrowserPluginMsg_SignalScrollCompletionEvent(handled)); |
| 472 } |
| 473 |
468 gfx::Point BrowserPluginGuest::GetScreenCoordinates( | 474 gfx::Point BrowserPluginGuest::GetScreenCoordinates( |
469 const gfx::Point& relative_position) const { | 475 const gfx::Point& relative_position) const { |
470 if (!attached()) | 476 if (!attached()) |
471 return relative_position; | 477 return relative_position; |
472 | 478 |
473 gfx::Point screen_pos(relative_position); | 479 gfx::Point screen_pos(relative_position); |
474 screen_pos += guest_window_rect_.OffsetFromOrigin(); | 480 screen_pos += guest_window_rect_.OffsetFromOrigin(); |
475 return screen_pos; | 481 return screen_pos; |
476 } | 482 } |
477 | 483 |
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
981 void BrowserPluginGuest::OnImeCompositionRangeChanged( | 987 void BrowserPluginGuest::OnImeCompositionRangeChanged( |
982 const gfx::Range& range, | 988 const gfx::Range& range, |
983 const std::vector<gfx::Rect>& character_bounds) { | 989 const std::vector<gfx::Rect>& character_bounds) { |
984 static_cast<RenderWidgetHostViewBase*>( | 990 static_cast<RenderWidgetHostViewBase*>( |
985 web_contents()->GetRenderWidgetHostView())->ImeCompositionRangeChanged( | 991 web_contents()->GetRenderWidgetHostView())->ImeCompositionRangeChanged( |
986 range, character_bounds); | 992 range, character_bounds); |
987 } | 993 } |
988 #endif | 994 #endif |
989 | 995 |
990 } // namespace content | 996 } // namespace content |
OLD | NEW |