OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef UI_VIEWS_CONTROLS_MENU_MENU_RUNNER_IMPL_INTERFACE_H_ | |
6 #define UI_VIEWS_CONTROLS_MENU_MENU_RUNNER_IMPL_INTERFACE_H_ | |
7 | |
8 #include "ui/views/controls/menu/menu_runner.h" | |
9 | |
10 namespace views { | |
11 namespace internal { | |
12 | |
13 // Manages the menu. To destroy a MenuRunnerImpl invoke Release(). Release() | |
14 // deletes immediately if the menu isn't showing. If the menu is showing | |
15 // Release() cancels the menu and when the nested RunMenuAt() call returns | |
16 // deletes itself and the menu. | |
17 class MenuRunnerImplInterface { | |
18 public: | |
19 virtual bool running() const = 0; | |
tapted
2014/06/25 08:30:28
nit: comment
| |
20 | |
21 // See description above class for details. | |
22 virtual void Release() = 0; | |
23 | |
24 // Runs the menu. | |
25 virtual MenuRunner::RunResult RunMenuAt(Widget* parent, | |
26 MenuButton* button, | |
27 const gfx::Rect& bounds, | |
28 MenuAnchorPosition anchor, | |
29 int32 types) WARN_UNUSED_RESULT = 0; | |
30 virtual void Cancel() = 0; | |
tapted
2014/06/25 08:30:28
nit: comment
| |
31 | |
32 // Returns the time from the event which closed the menu - or 0. | |
33 virtual base::TimeDelta closing_event_time() const = 0; | |
34 }; | |
35 | |
36 } // namespace internal | |
37 } // namespace views | |
38 | |
39 #endif // UI_VIEWS_CONTROLS_MENU_MENU_RUNNER_IMPL_INTERFACE_H_ | |
OLD | NEW |