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 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
461 | 461 |
462 // If true, Run blocks. If false, Run doesn't block and this is used for | 462 // If true, Run blocks. If false, Run doesn't block and this is used for |
463 // drag and drop. Note that the semantics for drag and drop are slightly | 463 // drag and drop. Note that the semantics for drag and drop are slightly |
464 // different: cancel timer is kicked off any time the drag moves outside the | 464 // different: cancel timer is kicked off any time the drag moves outside the |
465 // menu, mouse events do nothing... | 465 // menu, mouse events do nothing... |
466 bool blocking_run_; | 466 bool blocking_run_; |
467 | 467 |
468 // If true, we're showing. | 468 // If true, we're showing. |
469 bool showing_; | 469 bool showing_; |
470 | 470 |
471 // Is true for some menu types and only until the first mouse press or mouse | |
472 // release event occurs. | |
473 bool drop_first_release_event_; | |
474 | |
475 // Indicates what to exit. | 471 // Indicates what to exit. |
476 ExitType exit_type_; | 472 ExitType exit_type_; |
477 | 473 |
478 // Whether we did a capture. We do a capture only if we're blocking and | 474 // Whether we did a capture. We do a capture only if we're blocking and |
479 // the mouse was down when Run. | 475 // the mouse was down when Run. |
480 bool did_capture_; | 476 bool did_capture_; |
481 | 477 |
482 // As the user drags the mouse around pending_state_ changes immediately. | 478 // As the user drags the mouse around pending_state_ changes immediately. |
483 // When the user stops moving/dragging the mouse (or clicks the mouse) | 479 // When the user stops moving/dragging the mouse (or clicks the mouse) |
484 // pending_state_ is committed to state_, potentially resulting in | 480 // pending_state_ is committed to state_, potentially resulting in |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
556 // How deep we are in nested message loops. This should be at most 2 (when | 552 // How deep we are in nested message loops. This should be at most 2 (when |
557 // showing a context menu from a menu). | 553 // showing a context menu from a menu). |
558 int message_loop_depth_; | 554 int message_loop_depth_; |
559 | 555 |
560 DISALLOW_COPY_AND_ASSIGN(MenuController); | 556 DISALLOW_COPY_AND_ASSIGN(MenuController); |
561 }; | 557 }; |
562 | 558 |
563 } // namespace views | 559 } // namespace views |
564 | 560 |
565 #endif // UI_VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_ | 561 #endif // UI_VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_ |
OLD | NEW |