| 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::AccessibilitySetFocus(int object_id) { | 698 void RenderFrameHostImpl::AccessibilityPerformAction( |
| 699 Send(new AccessibilityMsg_SetFocus(routing_id_, object_id)); | 699 const ui::AXActionData& action_data) { |
| 700 } | 700 Send(new AccessibilityMsg_PerformAction(routing_id_, action_data)); |
| 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)); | |
| 742 } | 701 } |
| 743 | 702 |
| 744 bool RenderFrameHostImpl::AccessibilityViewHasFocus() const { | 703 bool RenderFrameHostImpl::AccessibilityViewHasFocus() const { |
| 745 RenderWidgetHostView* view = render_view_host_->GetWidget()->GetView(); | 704 RenderWidgetHostView* view = render_view_host_->GetWidget()->GetView(); |
| 746 if (view) | 705 if (view) |
| 747 return view->HasFocus(); | 706 return view->HasFocus(); |
| 748 return false; | 707 return false; |
| 749 } | 708 } |
| 750 | 709 |
| 751 gfx::Rect RenderFrameHostImpl::AccessibilityGetViewBounds() const { | 710 gfx::Rect RenderFrameHostImpl::AccessibilityGetViewBounds() const { |
| 752 RenderWidgetHostView* view = render_view_host_->GetWidget()->GetView(); | 711 RenderWidgetHostView* view = render_view_host_->GetWidget()->GetView(); |
| 753 if (view) | 712 if (view) |
| 754 return view->GetViewBounds(); | 713 return view->GetViewBounds(); |
| 755 return gfx::Rect(); | 714 return gfx::Rect(); |
| 756 } | 715 } |
| 757 | 716 |
| 758 gfx::Point RenderFrameHostImpl::AccessibilityOriginInScreen( | 717 gfx::Point RenderFrameHostImpl::AccessibilityOriginInScreen( |
| 759 const gfx::Rect& bounds) const { | 718 const gfx::Rect& bounds) const { |
| 760 RenderWidgetHostViewBase* view = static_cast<RenderWidgetHostViewBase*>( | 719 RenderWidgetHostViewBase* view = static_cast<RenderWidgetHostViewBase*>( |
| 761 render_view_host_->GetWidget()->GetView()); | 720 render_view_host_->GetWidget()->GetView()); |
| 762 if (view) | 721 if (view) |
| 763 return view->AccessibilityOriginInScreen(bounds); | 722 return view->AccessibilityOriginInScreen(bounds); |
| 764 return gfx::Point(); | 723 return gfx::Point(); |
| 765 } | 724 } |
| 766 | 725 |
| 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 | |
| 775 void RenderFrameHostImpl::AccessibilityReset() { | 726 void RenderFrameHostImpl::AccessibilityReset() { |
| 776 accessibility_reset_token_ = g_next_accessibility_reset_token++; | 727 accessibility_reset_token_ = g_next_accessibility_reset_token++; |
| 777 Send(new AccessibilityMsg_Reset(routing_id_, accessibility_reset_token_)); | 728 Send(new AccessibilityMsg_Reset(routing_id_, accessibility_reset_token_)); |
| 778 } | 729 } |
| 779 | 730 |
| 780 void RenderFrameHostImpl::AccessibilityFatalError() { | 731 void RenderFrameHostImpl::AccessibilityFatalError() { |
| 781 browser_accessibility_manager_.reset(NULL); | 732 browser_accessibility_manager_.reset(NULL); |
| 782 if (accessibility_reset_token_) | 733 if (accessibility_reset_token_) |
| 783 return; | 734 return; |
| 784 | 735 |
| (...skipping 2368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3153 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( | 3104 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( |
| 3154 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); | 3105 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); |
| 3155 return web_bluetooth_service_.get(); | 3106 return web_bluetooth_service_.get(); |
| 3156 } | 3107 } |
| 3157 | 3108 |
| 3158 void RenderFrameHostImpl::DeleteWebBluetoothService() { | 3109 void RenderFrameHostImpl::DeleteWebBluetoothService() { |
| 3159 web_bluetooth_service_.reset(); | 3110 web_bluetooth_service_.reset(); |
| 3160 } | 3111 } |
| 3161 | 3112 |
| 3162 } // namespace content | 3113 } // namespace content |
| OLD | NEW |