| OLD | NEW |
| 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 1405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1416 ui::ET_MOUSE_RELEASED, center, center, ui::EventTimeForNow(), | 1416 ui::ET_MOUSE_RELEASED, center, center, ui::EventTimeForNow(), |
| 1417 ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON)); | 1417 ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON)); |
| 1418 return true; | 1418 return true; |
| 1419 } | 1419 } |
| 1420 case ui::AX_ACTION_FOCUS: | 1420 case ui::AX_ACTION_FOCUS: |
| 1421 if (IsAccessibilityFocusable()) { | 1421 if (IsAccessibilityFocusable()) { |
| 1422 RequestFocus(); | 1422 RequestFocus(); |
| 1423 return true; | 1423 return true; |
| 1424 } | 1424 } |
| 1425 break; | 1425 break; |
| 1426 case ui::AX_ACTION_HIT_TEST: |
| 1427 NotifyAccessibilityEvent(action_data.hit_test_event_to_fire, true); |
| 1428 return true; |
| 1426 case ui::AX_ACTION_SCROLL_TO_MAKE_VISIBLE: | 1429 case ui::AX_ACTION_SCROLL_TO_MAKE_VISIBLE: |
| 1427 ScrollRectToVisible(GetLocalBounds()); | 1430 ScrollRectToVisible(GetLocalBounds()); |
| 1428 return true; | 1431 return true; |
| 1429 case ui::AX_ACTION_SHOW_CONTEXT_MENU: | 1432 case ui::AX_ACTION_SHOW_CONTEXT_MENU: |
| 1430 ShowContextMenu(GetBoundsInScreen().CenterPoint(), | 1433 ShowContextMenu(GetBoundsInScreen().CenterPoint(), |
| 1431 ui::MENU_SOURCE_KEYBOARD); | 1434 ui::MENU_SOURCE_KEYBOARD); |
| 1432 return true; | 1435 return true; |
| 1433 default: | 1436 default: |
| 1434 // Some actions are handled by subclasses of View. | 1437 // Some actions are handled by subclasses of View. |
| 1435 break; | 1438 break; |
| (...skipping 1208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2644 // Message the RootView to do the drag and drop. That way if we're removed | 2647 // Message the RootView to do the drag and drop. That way if we're removed |
| 2645 // the RootView can detect it and avoid calling us back. | 2648 // the RootView can detect it and avoid calling us back. |
| 2646 gfx::Point widget_location(event.location()); | 2649 gfx::Point widget_location(event.location()); |
| 2647 ConvertPointToWidget(this, &widget_location); | 2650 ConvertPointToWidget(this, &widget_location); |
| 2648 widget->RunShellDrag(this, data, widget_location, drag_operations, source); | 2651 widget->RunShellDrag(this, data, widget_location, drag_operations, source); |
| 2649 // WARNING: we may have been deleted. | 2652 // WARNING: we may have been deleted. |
| 2650 return true; | 2653 return true; |
| 2651 } | 2654 } |
| 2652 | 2655 |
| 2653 } // namespace views | 2656 } // namespace views |
| OLD | NEW |