OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "views/controls/menu/menu_scroll_view_container.h" | 5 #include "views/controls/menu/menu_scroll_view_container.h" |
6 | 6 |
7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
8 #include <windows.h> | 8 #include <windows.h> |
9 #include <uxtheme.h> | 9 #include <uxtheme.h> |
10 #include <Vssym32.h> | 10 #include <Vssym32.h> |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 return true; // Always return true so that drop events are targeted to us. | 60 return true; // Always return true so that drop events are targeted to us. |
61 } | 61 } |
62 | 62 |
63 virtual void OnDragEntered(const DropTargetEvent& event) { | 63 virtual void OnDragEntered(const DropTargetEvent& event) { |
64 DCHECK(host_->GetMenuItem()->GetMenuController()); | 64 DCHECK(host_->GetMenuItem()->GetMenuController()); |
65 host_->GetMenuItem()->GetMenuController()->OnDragEnteredScrollButton( | 65 host_->GetMenuItem()->GetMenuController()->OnDragEnteredScrollButton( |
66 host_, is_up_); | 66 host_, is_up_); |
67 } | 67 } |
68 | 68 |
69 virtual int OnDragUpdated(const DropTargetEvent& event) { | 69 virtual int OnDragUpdated(const DropTargetEvent& event) { |
70 return DragDropTypes::DRAG_NONE; | 70 return ui::DragDropTypes::DRAG_NONE; |
71 } | 71 } |
72 | 72 |
73 virtual void OnDragExited() { | 73 virtual void OnDragExited() { |
74 DCHECK(host_->GetMenuItem()->GetMenuController()); | 74 DCHECK(host_->GetMenuItem()->GetMenuController()); |
75 host_->GetMenuItem()->GetMenuController()->OnDragExitedScrollButton(host_); | 75 host_->GetMenuItem()->GetMenuController()->OnDragExitedScrollButton(host_); |
76 } | 76 } |
77 | 77 |
78 virtual int OnPerformDrop(const DropTargetEvent& event) { | 78 virtual int OnPerformDrop(const DropTargetEvent& event) { |
79 return DragDropTypes::DRAG_NONE; | 79 return ui::DragDropTypes::DRAG_NONE; |
80 } | 80 } |
81 | 81 |
82 virtual void Paint(gfx::Canvas* canvas) { | 82 virtual void Paint(gfx::Canvas* canvas) { |
83 const MenuConfig& config = MenuConfig::instance(); | 83 const MenuConfig& config = MenuConfig::instance(); |
84 | 84 |
85 #if defined(OS_WIN) | 85 #if defined(OS_WIN) |
86 HDC dc = canvas->BeginPlatformPaint(); | 86 HDC dc = canvas->BeginPlatformPaint(); |
87 | 87 |
88 // The background. | 88 // The background. |
89 RECT item_bounds = { 0, 0, width(), height() }; | 89 RECT item_bounds = { 0, 0, width(), height() }; |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 return AccessibilityTypes::ROLE_MENUBAR; | 271 return AccessibilityTypes::ROLE_MENUBAR; |
272 } | 272 } |
273 | 273 |
274 AccessibilityTypes::State MenuScrollViewContainer::GetAccessibleState() { | 274 AccessibilityTypes::State MenuScrollViewContainer::GetAccessibleState() { |
275 // Some AT (like NVDA) will not process focus events on menu item children | 275 // Some AT (like NVDA) will not process focus events on menu item children |
276 // unless a parent claims to be focused. | 276 // unless a parent claims to be focused. |
277 return AccessibilityTypes::STATE_FOCUSED; | 277 return AccessibilityTypes::STATE_FOCUSED; |
278 } | 278 } |
279 | 279 |
280 } // namespace views | 280 } // namespace views |
OLD | NEW |