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

Side by Side Diff: ui/views/controls/menu/menu_controller.h

Issue 1355063004: Template methods on Timer classes instead of the classes themselves. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: timer: fixcaller Created 5 years, 3 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
« no previous file with comments | « ui/ozone/platform/drm/gpu/drm_window.h ('k') | ui/views/controls/menu/menu_controller.cc » ('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) 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 #ifndef UI_VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_ 5 #ifndef UI_VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_
6 #define UI_VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_ 6 #define UI_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>
(...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after
560 int accept_event_flags_; 560 int accept_event_flags_;
561 561
562 // If not empty, it means we're nested. When Run is invoked from within 562 // If not empty, it means we're nested. When Run is invoked from within
563 // Run, the current state (state_) is pushed onto menu_stack_. This allows 563 // Run, the current state (state_) is pushed onto menu_stack_. This allows
564 // MenuController to restore the state when the nested run returns. 564 // MenuController to restore the state when the nested run returns.
565 typedef std::pair<State, linked_ptr<MenuButton::PressedLock> > NestedState; 565 typedef std::pair<State, linked_ptr<MenuButton::PressedLock> > NestedState;
566 std::list<NestedState> menu_stack_; 566 std::list<NestedState> menu_stack_;
567 567
568 // As the mouse moves around submenus are not opened immediately. Instead 568 // As the mouse moves around submenus are not opened immediately. Instead
569 // they open after this timer fires. 569 // they open after this timer fires.
570 base::OneShotTimer<MenuController> show_timer_; 570 base::OneShotTimer show_timer_;
571 571
572 // Used to invoke CancelAll(). This is used during drag and drop to hide the 572 // Used to invoke CancelAll(). This is used during drag and drop to hide the
573 // menu after the mouse moves out of the of the menu. This is necessitated by 573 // menu after the mouse moves out of the of the menu. This is necessitated by
574 // the lack of an ability to detect when the drag has completed from the drop 574 // the lack of an ability to detect when the drag has completed from the drop
575 // side. 575 // side.
576 base::OneShotTimer<MenuController> cancel_all_timer_; 576 base::OneShotTimer cancel_all_timer_;
577 577
578 // Drop target. 578 // Drop target.
579 MenuItemView* drop_target_; 579 MenuItemView* drop_target_;
580 MenuDelegate::DropPosition drop_position_; 580 MenuDelegate::DropPosition drop_position_;
581 581
582 // Owner of child windows. 582 // Owner of child windows.
583 // WARNING: this may be NULL. 583 // WARNING: this may be NULL.
584 Widget* owner_; 584 Widget* owner_;
585 585
586 // Indicates a possible drag operation. 586 // Indicates a possible drag operation.
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
643 bool item_selected_by_touch_; 643 bool item_selected_by_touch_;
644 644
645 scoped_ptr<MenuMessageLoop> message_loop_; 645 scoped_ptr<MenuMessageLoop> message_loop_;
646 646
647 DISALLOW_COPY_AND_ASSIGN(MenuController); 647 DISALLOW_COPY_AND_ASSIGN(MenuController);
648 }; 648 };
649 649
650 } // namespace views 650 } // namespace views
651 651
652 #endif // UI_VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_ 652 #endif // UI_VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_
OLDNEW
« no previous file with comments | « ui/ozone/platform/drm/gpu/drm_window.h ('k') | ui/views/controls/menu/menu_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698