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

Side by Side Diff: ui/views/view.cc

Issue 2746813002: Hide AXPlatformNode on ChromeOS. (Closed)
Patch Set: fix stub Created 3 years, 9 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 (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 27 matching lines...) Expand all
38 #include "ui/events/event_target_iterator.h" 38 #include "ui/events/event_target_iterator.h"
39 #include "ui/gfx/canvas.h" 39 #include "ui/gfx/canvas.h"
40 #include "ui/gfx/geometry/point3_f.h" 40 #include "ui/gfx/geometry/point3_f.h"
41 #include "ui/gfx/geometry/point_conversions.h" 41 #include "ui/gfx/geometry/point_conversions.h"
42 #include "ui/gfx/interpolated_transform.h" 42 #include "ui/gfx/interpolated_transform.h"
43 #include "ui/gfx/path.h" 43 #include "ui/gfx/path.h"
44 #include "ui/gfx/scoped_canvas.h" 44 #include "ui/gfx/scoped_canvas.h"
45 #include "ui/gfx/skia_util.h" 45 #include "ui/gfx/skia_util.h"
46 #include "ui/gfx/transform.h" 46 #include "ui/gfx/transform.h"
47 #include "ui/native_theme/native_theme.h" 47 #include "ui/native_theme/native_theme.h"
48 #include "ui/views/accessibility/native_view_accessibility.h" 48 #include "ui/views/accessibility/native_view_accessibility_base.h"
49 #include "ui/views/background.h" 49 #include "ui/views/background.h"
50 #include "ui/views/border.h" 50 #include "ui/views/border.h"
51 #include "ui/views/context_menu_controller.h" 51 #include "ui/views/context_menu_controller.h"
52 #include "ui/views/drag_controller.h" 52 #include "ui/views/drag_controller.h"
53 #include "ui/views/focus/view_storage.h" 53 #include "ui/views/focus/view_storage.h"
54 #include "ui/views/layout/layout_manager.h" 54 #include "ui/views/layout/layout_manager.h"
55 #include "ui/views/view_observer.h" 55 #include "ui/views/view_observer.h"
56 #include "ui/views/views_delegate.h" 56 #include "ui/views/views_delegate.h"
57 #include "ui/views/widget/native_widget_private.h" 57 #include "ui/views/widget/native_widget_private.h"
58 #include "ui/views/widget/root_view.h" 58 #include "ui/views/widget/root_view.h"
(...skipping 1352 matching lines...) Expand 10 before | Expand all | Expand 10 after
1411 } 1411 }
1412 1412
1413 // Accessibility---------------------------------------------------------------- 1413 // Accessibility----------------------------------------------------------------
1414 1414
1415 bool View::HandleAccessibleAction(const ui::AXActionData& action_data) { 1415 bool View::HandleAccessibleAction(const ui::AXActionData& action_data) {
1416 return false; 1416 return false;
1417 } 1417 }
1418 1418
1419 gfx::NativeViewAccessible View::GetNativeViewAccessible() { 1419 gfx::NativeViewAccessible View::GetNativeViewAccessible() {
1420 if (!native_view_accessibility_) 1420 if (!native_view_accessibility_)
1421 native_view_accessibility_ = NativeViewAccessibility::Create(this); 1421 native_view_accessibility_ = NativeViewAccessibilityBase::Create(this);
1422 if (native_view_accessibility_) 1422 if (native_view_accessibility_)
1423 return native_view_accessibility_->GetNativeObject(); 1423 return native_view_accessibility_->GetNativeObject();
1424 return nullptr; 1424 return nullptr;
1425 } 1425 }
1426 1426
1427 void View::NotifyAccessibilityEvent( 1427 void View::NotifyAccessibilityEvent(
1428 ui::AXEvent event_type, 1428 ui::AXEvent event_type,
1429 bool send_native_event) { 1429 bool send_native_event) {
1430 if (ViewsDelegate::GetInstance()) 1430 if (ViewsDelegate::GetInstance())
1431 ViewsDelegate::GetInstance()->NotifyAccessibilityEvent(this, event_type); 1431 ViewsDelegate::GetInstance()->NotifyAccessibilityEvent(this, event_type);
1432 1432
1433 if (send_native_event && GetWidget()) { 1433 if (send_native_event && GetWidget()) {
1434 if (!native_view_accessibility_) 1434 if (!native_view_accessibility_)
1435 native_view_accessibility_ = NativeViewAccessibility::Create(this); 1435 native_view_accessibility_ = NativeViewAccessibilityBase::Create(this);
1436 if (native_view_accessibility_) 1436 if (native_view_accessibility_)
1437 native_view_accessibility_->NotifyAccessibilityEvent(event_type); 1437 native_view_accessibility_->NotifyAccessibilityEvent(event_type);
1438 } 1438 }
1439 } 1439 }
1440 1440
1441 // Scrolling ------------------------------------------------------------------- 1441 // Scrolling -------------------------------------------------------------------
1442 1442
1443 void View::ScrollRectToVisible(const gfx::Rect& rect) { 1443 void View::ScrollRectToVisible(const gfx::Rect& rect) {
1444 // We must take RTL UI mirroring into account when adjusting the position of 1444 // We must take RTL UI mirroring into account when adjusting the position of
1445 // the region. 1445 // the region.
(...skipping 1116 matching lines...) Expand 10 before | Expand all | Expand 10 after
2562 // Message the RootView to do the drag and drop. That way if we're removed 2562 // Message the RootView to do the drag and drop. That way if we're removed
2563 // the RootView can detect it and avoid calling us back. 2563 // the RootView can detect it and avoid calling us back.
2564 gfx::Point widget_location(event.location()); 2564 gfx::Point widget_location(event.location());
2565 ConvertPointToWidget(this, &widget_location); 2565 ConvertPointToWidget(this, &widget_location);
2566 widget->RunShellDrag(this, data, widget_location, drag_operations, source); 2566 widget->RunShellDrag(this, data, widget_location, drag_operations, source);
2567 // WARNING: we may have been deleted. 2567 // WARNING: we may have been deleted.
2568 return true; 2568 return true;
2569 } 2569 }
2570 2570
2571 } // namespace views 2571 } // namespace views
OLDNEW
« ui/views/controls/tabbed_pane/tabbed_pane_unittest.cc ('K') | « ui/views/view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698