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 #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 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
395 // Starts/stops the timer that commits the pending state to state | 395 // Starts/stops the timer that commits the pending state to state |
396 // (opens/closes submenus). | 396 // (opens/closes submenus). |
397 void StartShowTimer(); | 397 void StartShowTimer(); |
398 void StopShowTimer(); | 398 void StopShowTimer(); |
399 | 399 |
400 // Starts/stops the timer cancel the menu. This is used during drag and | 400 // Starts/stops the timer cancel the menu. This is used during drag and |
401 // drop when the drop enters/exits the menu. | 401 // drop when the drop enters/exits the menu. |
402 void StartCancelAllTimer(); | 402 void StartCancelAllTimer(); |
403 void StopCancelAllTimer(); | 403 void StopCancelAllTimer(); |
404 | 404 |
405 // Closes the menu because a drag left the view. | |
Finnur
2014/07/18 10:40:40
Drag (noun), pronounced /drag/.
"a boring or tires
Devlin
2014/07/18 15:44:32
Haha fair enough. :) I'd like to stick to drag-an
Finnur
2014/07/18 15:53:51
Yup, what you have now is good.
| |
406 void CancelAllForDrag(); | |
407 | |
405 // Calculates the bounds of the menu to show. is_leading is set to match the | 408 // Calculates the bounds of the menu to show. is_leading is set to match the |
406 // direction the menu opened in. | 409 // direction the menu opened in. |
407 gfx::Rect CalculateMenuBounds(MenuItemView* item, | 410 gfx::Rect CalculateMenuBounds(MenuItemView* item, |
408 bool prefer_leading, | 411 bool prefer_leading, |
409 bool* is_leading); | 412 bool* is_leading); |
410 | 413 |
411 // Calculates the bubble bounds of the menu to show. is_leading is set to | 414 // Calculates the bubble bounds of the menu to show. is_leading is set to |
412 // match the direction the menu opened in. | 415 // match the direction the menu opened in. |
413 gfx::Rect CalculateBubbleMenuBounds(MenuItemView* item, | 416 gfx::Rect CalculateBubbleMenuBounds(MenuItemView* item, |
414 bool prefer_leading, | 417 bool prefer_leading, |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
622 bool item_selected_by_touch_; | 625 bool item_selected_by_touch_; |
623 | 626 |
624 scoped_ptr<MenuMessageLoop> message_loop_; | 627 scoped_ptr<MenuMessageLoop> message_loop_; |
625 | 628 |
626 DISALLOW_COPY_AND_ASSIGN(MenuController); | 629 DISALLOW_COPY_AND_ASSIGN(MenuController); |
627 }; | 630 }; |
628 | 631 |
629 } // namespace views | 632 } // namespace views |
630 | 633 |
631 #endif // UI_VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_ | 634 #endif // UI_VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_ |
OLD | NEW |