| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/frame_host/render_widget_host_view_guest.h" | 5 #include "content/browser/frame_host/render_widget_host_view_guest.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind_helpers.h" | 9 #include "base/bind_helpers.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 464 guest_bounds.x() - embedder_bounds.x(), | 464 guest_bounds.x() - embedder_bounds.x(), |
| 465 // Vertical offset from guest's top to embedder's bottom edge. | 465 // Vertical offset from guest's top to embedder's bottom edge. |
| 466 embedder_bounds.bottom() - guest_bounds.y()); | 466 embedder_bounds.bottom() - guest_bounds.y()); |
| 467 | 467 |
| 468 RenderWidgetHostViewMacDictionaryHelper helper(platform_view_.get()); | 468 RenderWidgetHostViewMacDictionaryHelper helper(platform_view_.get()); |
| 469 helper.SetTargetView(rwhv); | 469 helper.SetTargetView(rwhv); |
| 470 helper.set_offset(guest_offset); | 470 helper.set_offset(guest_offset); |
| 471 helper.ShowDefinitionForSelection(); | 471 helper.ShowDefinitionForSelection(); |
| 472 } | 472 } |
| 473 | 473 |
| 474 bool RenderWidgetHostViewGuest::SupportsSpeech() const { | |
| 475 return platform_view_->SupportsSpeech(); | |
| 476 } | |
| 477 | |
| 478 void RenderWidgetHostViewGuest::SpeakSelection() { | 474 void RenderWidgetHostViewGuest::SpeakSelection() { |
| 479 platform_view_->SpeakSelection(); | 475 platform_view_->SpeakSelection(); |
| 480 } | 476 } |
| 481 | 477 |
| 482 bool RenderWidgetHostViewGuest::IsSpeaking() const { | |
| 483 return platform_view_->IsSpeaking(); | |
| 484 } | |
| 485 | |
| 486 void RenderWidgetHostViewGuest::StopSpeaking() { | |
| 487 platform_view_->StopSpeaking(); | |
| 488 } | |
| 489 #endif // defined(OS_MACOSX) | 478 #endif // defined(OS_MACOSX) |
| 490 | 479 |
| 491 RenderWidgetHostViewBase* | 480 RenderWidgetHostViewBase* |
| 492 RenderWidgetHostViewGuest::GetOwnerRenderWidgetHostView() const { | 481 RenderWidgetHostViewGuest::GetOwnerRenderWidgetHostView() const { |
| 493 return guest_ ? static_cast<RenderWidgetHostViewBase*>( | 482 return guest_ ? static_cast<RenderWidgetHostViewBase*>( |
| 494 guest_->GetOwnerRenderWidgetHostView()) | 483 guest_->GetOwnerRenderWidgetHostView()) |
| 495 : nullptr; | 484 : nullptr; |
| 496 } | 485 } |
| 497 | 486 |
| 498 // TODO(wjmaclean): When we remove BrowserPlugin, delete this code. | 487 // TODO(wjmaclean): When we remove BrowserPlugin, delete this code. |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 639 gesture_event.data.scrollUpdate.inertialPhase == | 628 gesture_event.data.scrollUpdate.inertialPhase == |
| 640 blink::WebGestureEvent::MomentumPhase) { | 629 blink::WebGestureEvent::MomentumPhase) { |
| 641 return; | 630 return; |
| 642 } | 631 } |
| 643 host_->ForwardGestureEvent(gesture_event); | 632 host_->ForwardGestureEvent(gesture_event); |
| 644 return; | 633 return; |
| 645 } | 634 } |
| 646 } | 635 } |
| 647 | 636 |
| 648 } // namespace content | 637 } // namespace content |
| OLD | NEW |