| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_frame_host_impl.h" | 5 #include "content/browser/frame_host/render_frame_host_impl.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 677 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 688 return handled; | 688 return handled; |
| 689 } | 689 } |
| 690 | 690 |
| 691 void RenderFrameHostImpl::OnAssociatedInterfaceRequest( | 691 void RenderFrameHostImpl::OnAssociatedInterfaceRequest( |
| 692 const std::string& interface_name, | 692 const std::string& interface_name, |
| 693 mojo::ScopedInterfaceEndpointHandle handle) { | 693 mojo::ScopedInterfaceEndpointHandle handle) { |
| 694 delegate_->OnAssociatedInterfaceRequest( | 694 delegate_->OnAssociatedInterfaceRequest( |
| 695 this, interface_name, std::move(handle)); | 695 this, interface_name, std::move(handle)); |
| 696 } | 696 } |
| 697 | 697 |
| 698 void RenderFrameHostImpl::AccessibilityPerformAction( | 698 void RenderFrameHostImpl::AccessibilitySetFocus(int object_id) { |
| 699 const ui::AXActionData& action_data) { | 699 Send(new AccessibilityMsg_SetFocus(routing_id_, object_id)); |
| 700 Send(new AccessibilityMsg_PerformAction(routing_id_, action_data)); | 700 } |
| 701 |
| 702 void RenderFrameHostImpl::AccessibilityDoDefaultAction(int object_id) { |
| 703 Send(new AccessibilityMsg_DoDefaultAction(routing_id_, object_id)); |
| 704 } |
| 705 |
| 706 void RenderFrameHostImpl::AccessibilityShowContextMenu(int acc_obj_id) { |
| 707 Send(new AccessibilityMsg_ShowContextMenu(routing_id_, acc_obj_id)); |
| 708 } |
| 709 |
| 710 void RenderFrameHostImpl::AccessibilityScrollToMakeVisible( |
| 711 int acc_obj_id, const gfx::Rect& subfocus) { |
| 712 Send(new AccessibilityMsg_ScrollToMakeVisible( |
| 713 routing_id_, acc_obj_id, subfocus)); |
| 714 } |
| 715 |
| 716 void RenderFrameHostImpl::AccessibilityScrollToPoint( |
| 717 int acc_obj_id, const gfx::Point& point) { |
| 718 Send(new AccessibilityMsg_ScrollToPoint( |
| 719 routing_id_, acc_obj_id, point)); |
| 720 } |
| 721 |
| 722 void RenderFrameHostImpl::AccessibilitySetScrollOffset( |
| 723 int acc_obj_id, const gfx::Point& offset) { |
| 724 Send(new AccessibilityMsg_SetScrollOffset( |
| 725 routing_id_, acc_obj_id, offset)); |
| 726 } |
| 727 |
| 728 void RenderFrameHostImpl::AccessibilitySetSelection(int anchor_object_id, |
| 729 int anchor_offset, |
| 730 int focus_object_id, |
| 731 int focus_offset) { |
| 732 Send(new AccessibilityMsg_SetSelection(routing_id_, |
| 733 anchor_object_id, |
| 734 anchor_offset, |
| 735 focus_object_id, |
| 736 focus_offset)); |
| 737 } |
| 738 |
| 739 void RenderFrameHostImpl::AccessibilitySetValue( |
| 740 int object_id, const base::string16& value) { |
| 741 Send(new AccessibilityMsg_SetValue(routing_id_, object_id, value)); |
| 701 } | 742 } |
| 702 | 743 |
| 703 bool RenderFrameHostImpl::AccessibilityViewHasFocus() const { | 744 bool RenderFrameHostImpl::AccessibilityViewHasFocus() const { |
| 704 RenderWidgetHostView* view = render_view_host_->GetWidget()->GetView(); | 745 RenderWidgetHostView* view = render_view_host_->GetWidget()->GetView(); |
| 705 if (view) | 746 if (view) |
| 706 return view->HasFocus(); | 747 return view->HasFocus(); |
| 707 return false; | 748 return false; |
| 708 } | 749 } |
| 709 | 750 |
| 710 gfx::Rect RenderFrameHostImpl::AccessibilityGetViewBounds() const { | 751 gfx::Rect RenderFrameHostImpl::AccessibilityGetViewBounds() const { |
| 711 RenderWidgetHostView* view = render_view_host_->GetWidget()->GetView(); | 752 RenderWidgetHostView* view = render_view_host_->GetWidget()->GetView(); |
| 712 if (view) | 753 if (view) |
| 713 return view->GetViewBounds(); | 754 return view->GetViewBounds(); |
| 714 return gfx::Rect(); | 755 return gfx::Rect(); |
| 715 } | 756 } |
| 716 | 757 |
| 717 gfx::Point RenderFrameHostImpl::AccessibilityOriginInScreen( | 758 gfx::Point RenderFrameHostImpl::AccessibilityOriginInScreen( |
| 718 const gfx::Rect& bounds) const { | 759 const gfx::Rect& bounds) const { |
| 719 RenderWidgetHostViewBase* view = static_cast<RenderWidgetHostViewBase*>( | 760 RenderWidgetHostViewBase* view = static_cast<RenderWidgetHostViewBase*>( |
| 720 render_view_host_->GetWidget()->GetView()); | 761 render_view_host_->GetWidget()->GetView()); |
| 721 if (view) | 762 if (view) |
| 722 return view->AccessibilityOriginInScreen(bounds); | 763 return view->AccessibilityOriginInScreen(bounds); |
| 723 return gfx::Point(); | 764 return gfx::Point(); |
| 724 } | 765 } |
| 725 | 766 |
| 767 void RenderFrameHostImpl::AccessibilityHitTest(const gfx::Point& point) { |
| 768 Send(new AccessibilityMsg_HitTest(routing_id_, point)); |
| 769 } |
| 770 |
| 771 void RenderFrameHostImpl::AccessibilitySetAccessibilityFocus(int acc_obj_id) { |
| 772 Send(new AccessibilityMsg_SetAccessibilityFocus(routing_id_, acc_obj_id)); |
| 773 } |
| 774 |
| 726 void RenderFrameHostImpl::AccessibilityReset() { | 775 void RenderFrameHostImpl::AccessibilityReset() { |
| 727 accessibility_reset_token_ = g_next_accessibility_reset_token++; | 776 accessibility_reset_token_ = g_next_accessibility_reset_token++; |
| 728 Send(new AccessibilityMsg_Reset(routing_id_, accessibility_reset_token_)); | 777 Send(new AccessibilityMsg_Reset(routing_id_, accessibility_reset_token_)); |
| 729 } | 778 } |
| 730 | 779 |
| 731 void RenderFrameHostImpl::AccessibilityFatalError() { | 780 void RenderFrameHostImpl::AccessibilityFatalError() { |
| 732 browser_accessibility_manager_.reset(NULL); | 781 browser_accessibility_manager_.reset(NULL); |
| 733 if (accessibility_reset_token_) | 782 if (accessibility_reset_token_) |
| 734 return; | 783 return; |
| 735 | 784 |
| (...skipping 2368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3104 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( | 3153 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( |
| 3105 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); | 3154 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); |
| 3106 return web_bluetooth_service_.get(); | 3155 return web_bluetooth_service_.get(); |
| 3107 } | 3156 } |
| 3108 | 3157 |
| 3109 void RenderFrameHostImpl::DeleteWebBluetoothService() { | 3158 void RenderFrameHostImpl::DeleteWebBluetoothService() { |
| 3110 web_bluetooth_service_.reset(); | 3159 web_bluetooth_service_.reset(); |
| 3111 } | 3160 } |
| 3112 | 3161 |
| 3113 } // namespace content | 3162 } // namespace content |
| OLD | NEW |