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

Side by Side Diff: ui/views/view.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/view.h ('k') | ui/views/widget/native_widget_mac_accessibility_unittest.mm » ('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 #define _USE_MATH_DEFINES // For VC++ to get M_PI. This has to be first. 5 #define _USE_MATH_DEFINES // For VC++ to get M_PI. This has to be first.
6 6
7 #include "ui/views/view.h" 7 #include "ui/views/view.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <cmath> 10 #include <cmath>
(...skipping 1305 matching lines...) Expand 10 before | Expand all | Expand 10 after
1316 } 1316 }
1317 1317
1318 // static 1318 // static
1319 bool View::ExceededDragThreshold(const gfx::Vector2d& delta) { 1319 bool View::ExceededDragThreshold(const gfx::Vector2d& delta) {
1320 return (abs(delta.x()) > GetHorizontalDragThreshold() || 1320 return (abs(delta.x()) > GetHorizontalDragThreshold() ||
1321 abs(delta.y()) > GetVerticalDragThreshold()); 1321 abs(delta.y()) > GetVerticalDragThreshold());
1322 } 1322 }
1323 1323
1324 // Accessibility---------------------------------------------------------------- 1324 // Accessibility----------------------------------------------------------------
1325 1325
1326 bool View::HandleAccessibleAction(const ui::AXActionData& action_data) {
1327 return false;
1328 }
1329
1326 gfx::NativeViewAccessible View::GetNativeViewAccessible() { 1330 gfx::NativeViewAccessible View::GetNativeViewAccessible() {
1327 if (!native_view_accessibility_) 1331 if (!native_view_accessibility_)
1328 native_view_accessibility_ = NativeViewAccessibility::Create(this); 1332 native_view_accessibility_ = NativeViewAccessibility::Create(this);
1329 if (native_view_accessibility_) 1333 if (native_view_accessibility_)
1330 return native_view_accessibility_->GetNativeObject(); 1334 return native_view_accessibility_->GetNativeObject();
1331 return NULL; 1335 return NULL;
1332 } 1336 }
1333 1337
1334 void View::NotifyAccessibilityEvent( 1338 void View::NotifyAccessibilityEvent(
1335 ui::AXEvent event_type, 1339 ui::AXEvent event_type,
(...skipping 1082 matching lines...) Expand 10 before | Expand all | Expand 10 after
2418 // Message the RootView to do the drag and drop. That way if we're removed 2422 // Message the RootView to do the drag and drop. That way if we're removed
2419 // the RootView can detect it and avoid calling us back. 2423 // the RootView can detect it and avoid calling us back.
2420 gfx::Point widget_location(event.location()); 2424 gfx::Point widget_location(event.location());
2421 ConvertPointToWidget(this, &widget_location); 2425 ConvertPointToWidget(this, &widget_location);
2422 widget->RunShellDrag(this, data, widget_location, drag_operations, source); 2426 widget->RunShellDrag(this, data, widget_location, drag_operations, source);
2423 // WARNING: we may have been deleted. 2427 // WARNING: we may have been deleted.
2424 return true; 2428 return true;
2425 } 2429 }
2426 2430
2427 } // namespace views 2431 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/view.h ('k') | ui/views/widget/native_widget_mac_accessibility_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698