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

Side by Side Diff: ui/views/controls/webview/webview.cc

Issue 2477463003: Replace ui::AXViewState with AXNodeData and AXActionData (Closed)
Patch Set: Fix test Created 4 years, 1 month 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
« no previous file with comments | « ui/views/controls/webview/webview.h ('k') | ui/views/view.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ui/views/controls/webview/webview.h" 5 #include "ui/views/controls/webview/webview.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 #include "content/public/browser/browser_accessibility_state.h" 10 #include "content/public/browser/browser_accessibility_state.h"
11 #include "content/public/browser/browser_context.h" 11 #include "content/public/browser/browser_context.h"
12 #include "content/public/browser/navigation_controller.h" 12 #include "content/public/browser/navigation_controller.h"
13 #include "content/public/browser/render_process_host.h" 13 #include "content/public/browser/render_process_host.h"
14 #include "content/public/browser/render_view_host.h" 14 #include "content/public/browser/render_view_host.h"
15 #include "content/public/browser/render_widget_host_view.h" 15 #include "content/public/browser/render_widget_host_view.h"
16 #include "content/public/browser/web_contents.h" 16 #include "content/public/browser/web_contents.h"
17 #include "ipc/ipc_message.h" 17 #include "ipc/ipc_message.h"
18 #include "ui/accessibility/ax_enums.h" 18 #include "ui/accessibility/ax_enums.h"
19 #include "ui/accessibility/ax_view_state.h" 19 #include "ui/accessibility/ax_node_data.h"
20 #include "ui/events/event.h" 20 #include "ui/events/event.h"
21 #include "ui/views/controls/native/native_view_host.h" 21 #include "ui/views/controls/native/native_view_host.h"
22 #include "ui/views/focus/focus_manager.h" 22 #include "ui/views/focus/focus_manager.h"
23 #include "ui/views/views_delegate.h" 23 #include "ui/views/views_delegate.h"
24 24
25 namespace views { 25 namespace views {
26 26
27 // static 27 // static
28 const char WebView::kViewClassName[] = "WebView"; 28 const char WebView::kViewClassName[] = "WebView";
29 29
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 void WebView::OnFocus() { 207 void WebView::OnFocus() {
208 if (web_contents()) 208 if (web_contents())
209 web_contents()->Focus(); 209 web_contents()->Focus();
210 } 210 }
211 211
212 void WebView::AboutToRequestFocusFromTabTraversal(bool reverse) { 212 void WebView::AboutToRequestFocusFromTabTraversal(bool reverse) {
213 if (web_contents()) 213 if (web_contents())
214 web_contents()->FocusThroughTabTraversal(reverse); 214 web_contents()->FocusThroughTabTraversal(reverse);
215 } 215 }
216 216
217 void WebView::GetAccessibleState(ui::AXViewState* state) { 217 void WebView::GetAccessibleNodeData(ui::AXNodeData* node_data) {
218 state->role = ui::AX_ROLE_WEB_VIEW; 218 node_data->role = ui::AX_ROLE_WEB_VIEW;
219 } 219 }
220 220
221 gfx::NativeViewAccessible WebView::GetNativeViewAccessible() { 221 gfx::NativeViewAccessible WebView::GetNativeViewAccessible() {
222 if (web_contents()) { 222 if (web_contents()) {
223 content::RenderWidgetHostView* host_view = 223 content::RenderWidgetHostView* host_view =
224 web_contents()->GetRenderWidgetHostView(); 224 web_contents()->GetRenderWidgetHostView();
225 if (host_view) 225 if (host_view)
226 return host_view->GetNativeViewAccessible(); 226 return host_view->GetNativeViewAccessible();
227 } 227 }
228 return View::GetNativeViewAccessible(); 228 return View::GetNativeViewAccessible();
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 if (!contents) { 383 if (!contents) {
384 content::WebContents::CreateParams create_params( 384 content::WebContents::CreateParams create_params(
385 browser_context, NULL); 385 browser_context, NULL);
386 return content::WebContents::Create(create_params); 386 return content::WebContents::Create(create_params);
387 } 387 }
388 388
389 return contents; 389 return contents;
390 } 390 }
391 391
392 } // namespace views 392 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/webview/webview.h ('k') | ui/views/view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698