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

Side by Side Diff: views/controls/menu/menu_scroll_view_container.cc

Issue 6250014: Move more dnd related files to ui/base (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « views/controls/menu/menu_delegate.h ('k') | views/event.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) 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
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
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
OLDNEW
« no previous file with comments | « views/controls/menu/menu_delegate.h ('k') | views/event.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698