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 1772 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1783 frame_tree_node_->IsMainFrame() | 1783 frame_tree_node_->IsMainFrame() |
1784 ? render_view_host_->GetWidget()->GetView() | 1784 ? render_view_host_->GetWidget()->GetView() |
1785 : frame_tree_node_->frame_tree() | 1785 : frame_tree_node_->frame_tree() |
1786 ->GetMainFrame() | 1786 ->GetMainFrame() |
1787 ->render_view_host_->GetWidget() | 1787 ->render_view_host_->GetWidget() |
1788 ->GetView()); | 1788 ->GetView()); |
1789 } | 1789 } |
1790 | 1790 |
1791 void RenderFrameHostImpl::OnAccessibilityEvents( | 1791 void RenderFrameHostImpl::OnAccessibilityEvents( |
1792 const std::vector<AccessibilityHostMsg_EventParams>& params, | 1792 const std::vector<AccessibilityHostMsg_EventParams>& params, |
1793 int reset_token) { | 1793 int reset_token, int ack_token) { |
1794 // Don't process this IPC if either we're waiting on a reset and this | 1794 // Don't process this IPC if either we're waiting on a reset and this |
1795 // IPC doesn't have the matching token ID, or if we're not waiting on a | 1795 // IPC doesn't have the matching token ID, or if we're not waiting on a |
1796 // reset but this message includes a reset token. | 1796 // reset but this message includes a reset token. |
1797 if (accessibility_reset_token_ != reset_token) { | 1797 if (accessibility_reset_token_ != reset_token) { |
1798 Send(new AccessibilityMsg_Events_ACK(routing_id_)); | 1798 Send(new AccessibilityMsg_Events_ACK(routing_id_, ack_token)); |
1799 return; | 1799 return; |
1800 } | 1800 } |
1801 accessibility_reset_token_ = 0; | 1801 accessibility_reset_token_ = 0; |
1802 | 1802 |
1803 RenderWidgetHostViewBase* view = GetViewForAccessibility(); | 1803 RenderWidgetHostViewBase* view = GetViewForAccessibility(); |
1804 | 1804 |
1805 AccessibilityMode accessibility_mode = delegate_->GetAccessibilityMode(); | 1805 AccessibilityMode accessibility_mode = delegate_->GetAccessibilityMode(); |
1806 if ((accessibility_mode != AccessibilityModeOff) && view && is_active()) { | 1806 if ((accessibility_mode != AccessibilityModeOff) && view && is_active()) { |
1807 if (accessibility_mode & AccessibilityModeFlagPlatform) | 1807 if (accessibility_mode & AccessibilityModeFlagPlatform) |
1808 GetOrCreateBrowserAccessibilityManager(); | 1808 GetOrCreateBrowserAccessibilityManager(); |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1857 } else { | 1857 } else { |
1858 CHECK(ax_tree_for_testing_->Unserialize(detail.update)) | 1858 CHECK(ax_tree_for_testing_->Unserialize(detail.update)) |
1859 << ax_tree_for_testing_->error(); | 1859 << ax_tree_for_testing_->error(); |
1860 } | 1860 } |
1861 accessibility_testing_callback_.Run(this, detail.event_type, detail.id); | 1861 accessibility_testing_callback_.Run(this, detail.event_type, detail.id); |
1862 } | 1862 } |
1863 } | 1863 } |
1864 } | 1864 } |
1865 | 1865 |
1866 // Always send an ACK or the renderer can be in a bad state. | 1866 // Always send an ACK or the renderer can be in a bad state. |
1867 Send(new AccessibilityMsg_Events_ACK(routing_id_)); | 1867 Send(new AccessibilityMsg_Events_ACK(routing_id_, ack_token)); |
1868 } | 1868 } |
1869 | 1869 |
1870 void RenderFrameHostImpl::OnAccessibilityLocationChanges( | 1870 void RenderFrameHostImpl::OnAccessibilityLocationChanges( |
1871 const std::vector<AccessibilityHostMsg_LocationChangeParams>& params) { | 1871 const std::vector<AccessibilityHostMsg_LocationChangeParams>& params) { |
1872 if (accessibility_reset_token_) | 1872 if (accessibility_reset_token_) |
1873 return; | 1873 return; |
1874 | 1874 |
1875 RenderWidgetHostViewBase* view = static_cast<RenderWidgetHostViewBase*>( | 1875 RenderWidgetHostViewBase* view = static_cast<RenderWidgetHostViewBase*>( |
1876 render_view_host_->GetWidget()->GetView()); | 1876 render_view_host_->GetWidget()->GetView()); |
1877 if (view && is_active()) { | 1877 if (view && is_active()) { |
(...skipping 1177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3055 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( | 3055 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( |
3056 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); | 3056 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); |
3057 return web_bluetooth_service_.get(); | 3057 return web_bluetooth_service_.get(); |
3058 } | 3058 } |
3059 | 3059 |
3060 void RenderFrameHostImpl::DeleteWebBluetoothService() { | 3060 void RenderFrameHostImpl::DeleteWebBluetoothService() { |
3061 web_bluetooth_service_.reset(); | 3061 web_bluetooth_service_.reset(); |
3062 } | 3062 } |
3063 | 3063 |
3064 } // namespace content | 3064 } // namespace content |
OLD | NEW |