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

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

Issue 2255093005: Pass accessible location change messages to the automation API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 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 1874 matching lines...) Expand 10 before | Expand all | Expand 10 after
1885 RenderWidgetHostViewBase* view = static_cast<RenderWidgetHostViewBase*>( 1885 RenderWidgetHostViewBase* view = static_cast<RenderWidgetHostViewBase*>(
1886 render_view_host_->GetWidget()->GetView()); 1886 render_view_host_->GetWidget()->GetView());
1887 if (view && is_active()) { 1887 if (view && is_active()) {
1888 AccessibilityMode accessibility_mode = delegate_->GetAccessibilityMode(); 1888 AccessibilityMode accessibility_mode = delegate_->GetAccessibilityMode();
1889 if (accessibility_mode & AccessibilityModeFlagPlatform) { 1889 if (accessibility_mode & AccessibilityModeFlagPlatform) {
1890 BrowserAccessibilityManager* manager = 1890 BrowserAccessibilityManager* manager =
1891 GetOrCreateBrowserAccessibilityManager(); 1891 GetOrCreateBrowserAccessibilityManager();
1892 if (manager) 1892 if (manager)
1893 manager->OnLocationChanges(params); 1893 manager->OnLocationChanges(params);
1894 } 1894 }
1895 // TODO(aboxhall): send location change events to web contents observers too 1895
aboxhall 2016/08/22 19:48:38 yay
1896 // Send the updates to the automation extension API.
1897 std::vector<AXLocationChangeNotificationDetails> details;
1898 details.reserve(params.size());
1899 for (size_t i = 0; i < params.size(); ++i) {
1900 const AccessibilityHostMsg_LocationChangeParams& param = params[i];
1901 AXLocationChangeNotificationDetails detail;
1902 detail.id = param.id;
1903 detail.ax_tree_id = GetAXTreeID();
1904 detail.new_location = param.new_location;
1905 details.push_back(detail);
1906 }
1907 delegate_->AccessibilityLocationChangesReceived(details);
1896 } 1908 }
1897 } 1909 }
1898 1910
1899 void RenderFrameHostImpl::OnAccessibilityFindInPageResult( 1911 void RenderFrameHostImpl::OnAccessibilityFindInPageResult(
1900 const AccessibilityHostMsg_FindInPageResultParams& params) { 1912 const AccessibilityHostMsg_FindInPageResultParams& params) {
1901 AccessibilityMode accessibility_mode = delegate_->GetAccessibilityMode(); 1913 AccessibilityMode accessibility_mode = delegate_->GetAccessibilityMode();
1902 if (accessibility_mode & AccessibilityModeFlagPlatform) { 1914 if (accessibility_mode & AccessibilityModeFlagPlatform) {
1903 BrowserAccessibilityManager* manager = 1915 BrowserAccessibilityManager* manager =
1904 GetOrCreateBrowserAccessibilityManager(); 1916 GetOrCreateBrowserAccessibilityManager();
1905 if (manager) { 1917 if (manager) {
(...skipping 1138 matching lines...) Expand 10 before | Expand all | Expand 10 after
3044 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( 3056 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind(
3045 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); 3057 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this)));
3046 return web_bluetooth_service_.get(); 3058 return web_bluetooth_service_.get();
3047 } 3059 }
3048 3060
3049 void RenderFrameHostImpl::DeleteWebBluetoothService() { 3061 void RenderFrameHostImpl::DeleteWebBluetoothService() {
3050 web_bluetooth_service_.reset(); 3062 web_bluetooth_service_.reset();
3051 } 3063 }
3052 3064
3053 } // namespace content 3065 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698