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

Side by Side Diff: content/browser/frame_host/render_widget_host_view_guest.cc

Issue 2688883002: Revert [MacViews] Implemented text context menu (Closed)
Patch Set: Created 3 years, 10 months 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 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
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
474 void RenderWidgetHostViewGuest::SpeakSelection() { 478 void RenderWidgetHostViewGuest::SpeakSelection() {
475 platform_view_->SpeakSelection(); 479 platform_view_->SpeakSelection();
476 } 480 }
477 481
482 bool RenderWidgetHostViewGuest::IsSpeaking() const {
483 return platform_view_->IsSpeaking();
484 }
485
486 void RenderWidgetHostViewGuest::StopSpeaking() {
487 platform_view_->StopSpeaking();
488 }
478 #endif // defined(OS_MACOSX) 489 #endif // defined(OS_MACOSX)
479 490
480 RenderWidgetHostViewBase* 491 RenderWidgetHostViewBase*
481 RenderWidgetHostViewGuest::GetOwnerRenderWidgetHostView() const { 492 RenderWidgetHostViewGuest::GetOwnerRenderWidgetHostView() const {
482 return guest_ ? static_cast<RenderWidgetHostViewBase*>( 493 return guest_ ? static_cast<RenderWidgetHostViewBase*>(
483 guest_->GetOwnerRenderWidgetHostView()) 494 guest_->GetOwnerRenderWidgetHostView())
484 : nullptr; 495 : nullptr;
485 } 496 }
486 497
487 // TODO(wjmaclean): When we remove BrowserPlugin, delete this code. 498 // TODO(wjmaclean): When we remove BrowserPlugin, delete this code.
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
628 gesture_event.data.scrollUpdate.inertialPhase == 639 gesture_event.data.scrollUpdate.inertialPhase ==
629 blink::WebGestureEvent::MomentumPhase) { 640 blink::WebGestureEvent::MomentumPhase) {
630 return; 641 return;
631 } 642 }
632 host_->ForwardGestureEvent(gesture_event); 643 host_->ForwardGestureEvent(gesture_event);
633 return; 644 return;
634 } 645 }
635 } 646 }
636 647
637 } // namespace content 648 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698