| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 #ifndef VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_ | 5 #ifndef VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_ |
| 6 #define VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_ | 6 #define VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
| 9 | 9 |
| 10 #include <list> | 10 #include <list> |
| 11 #include <set> |
| 11 #include <vector> | 12 #include <vector> |
| 12 | 13 |
| 13 #include "base/message_loop.h" | 14 #include "base/message_loop.h" |
| 14 #include "base/scoped_ptr.h" | 15 #include "base/scoped_ptr.h" |
| 15 #include "base/timer.h" | 16 #include "base/timer.h" |
| 16 #include "views/controls/menu/menu_delegate.h" | 17 #include "views/controls/menu/menu_delegate.h" |
| 17 #include "views/controls/menu/menu_item_view.h" | 18 #include "views/controls/menu/menu_item_view.h" |
| 18 | 19 |
| 19 class OSExchangeData; | 20 class OSExchangeData; |
| 20 | 21 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 | 73 |
| 73 // Various events, forwarded from the submenu. | 74 // Various events, forwarded from the submenu. |
| 74 // | 75 // |
| 75 // NOTE: the coordinates of the events are in that of the | 76 // NOTE: the coordinates of the events are in that of the |
| 76 // MenuScrollViewContainer. | 77 // MenuScrollViewContainer. |
| 77 void OnMousePressed(SubmenuView* source, const MouseEvent& event); | 78 void OnMousePressed(SubmenuView* source, const MouseEvent& event); |
| 78 void OnMouseDragged(SubmenuView* source, const MouseEvent& event); | 79 void OnMouseDragged(SubmenuView* source, const MouseEvent& event); |
| 79 void OnMouseReleased(SubmenuView* source, const MouseEvent& event); | 80 void OnMouseReleased(SubmenuView* source, const MouseEvent& event); |
| 80 void OnMouseMoved(SubmenuView* source, const MouseEvent& event); | 81 void OnMouseMoved(SubmenuView* source, const MouseEvent& event); |
| 81 void OnMouseEntered(SubmenuView* source, const MouseEvent& event); | 82 void OnMouseEntered(SubmenuView* source, const MouseEvent& event); |
| 83 bool GetDropFormats( |
| 84 SubmenuView* source, |
| 85 int* formats, |
| 86 std::set<OSExchangeData::CustomFormat>* custom_formats); |
| 87 bool AreDropTypesRequired(SubmenuView* source); |
| 82 bool CanDrop(SubmenuView* source, const OSExchangeData& data); | 88 bool CanDrop(SubmenuView* source, const OSExchangeData& data); |
| 83 void OnDragEntered(SubmenuView* source, const DropTargetEvent& event); | 89 void OnDragEntered(SubmenuView* source, const DropTargetEvent& event); |
| 84 int OnDragUpdated(SubmenuView* source, const DropTargetEvent& event); | 90 int OnDragUpdated(SubmenuView* source, const DropTargetEvent& event); |
| 85 void OnDragExited(SubmenuView* source); | 91 void OnDragExited(SubmenuView* source); |
| 86 int OnPerformDrop(SubmenuView* source, const DropTargetEvent& event); | 92 int OnPerformDrop(SubmenuView* source, const DropTargetEvent& event); |
| 87 | 93 |
| 88 // Invoked from the scroll buttons of the MenuScrollViewContainer. | 94 // Invoked from the scroll buttons of the MenuScrollViewContainer. |
| 89 void OnDragEnteredScrollButton(SubmenuView* source, bool is_up); | 95 void OnDragEnteredScrollButton(SubmenuView* source, bool is_up); |
| 90 void OnDragExitedScrollButton(SubmenuView* source); | 96 void OnDragExitedScrollButton(SubmenuView* source); |
| 91 | 97 |
| (...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 369 // Task for scrolling the menu. If non-null indicates a scroll is currently | 375 // Task for scrolling the menu. If non-null indicates a scroll is currently |
| 370 // underway. | 376 // underway. |
| 371 scoped_ptr<MenuScrollTask> scroll_task_; | 377 scoped_ptr<MenuScrollTask> scroll_task_; |
| 372 | 378 |
| 373 DISALLOW_COPY_AND_ASSIGN(MenuController); | 379 DISALLOW_COPY_AND_ASSIGN(MenuController); |
| 374 }; | 380 }; |
| 375 | 381 |
| 376 } // namespace views | 382 } // namespace views |
| 377 | 383 |
| 378 #endif // VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_ | 384 #endif // VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_ |
| OLD | NEW |