OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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_RUNNER_IMPL_INTERFACE_H_ | 5 #ifndef UI_VIEWS_CONTROLS_MENU_MENU_RUNNER_IMPL_INTERFACE_H_ |
6 #define UI_VIEWS_CONTROLS_MENU_MENU_RUNNER_IMPL_INTERFACE_H_ | 6 #define UI_VIEWS_CONTROLS_MENU_MENU_RUNNER_IMPL_INTERFACE_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "base/callback_forward.h" | 10 #include "base/callback_forward.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 int32_t run_types, | 27 int32_t run_types, |
28 const base::Closure& on_menu_closed_callback); | 28 const base::Closure& on_menu_closed_callback); |
29 | 29 |
30 // Returns true if we're in a nested message loop running the menu. | 30 // Returns true if we're in a nested message loop running the menu. |
31 virtual bool IsRunning() const = 0; | 31 virtual bool IsRunning() const = 0; |
32 | 32 |
33 // See description above class for details. | 33 // See description above class for details. |
34 virtual void Release() = 0; | 34 virtual void Release() = 0; |
35 | 35 |
36 // Runs the menu. See MenuRunner::RunMenuAt for more details. | 36 // Runs the menu. See MenuRunner::RunMenuAt for more details. |
37 virtual MenuRunner::RunResult RunMenuAt(Widget* parent, | 37 virtual void RunMenuAt(Widget* parent, |
38 MenuButton* button, | 38 MenuButton* button, |
39 const gfx::Rect& bounds, | 39 const gfx::Rect& bounds, |
40 MenuAnchorPosition anchor, | 40 MenuAnchorPosition anchor, |
41 int32_t run_types) | 41 int32_t run_types) = 0; |
42 WARN_UNUSED_RESULT = 0; | |
43 | 42 |
44 // Hides and cancels the menu. | 43 // Hides and cancels the menu. |
45 virtual void Cancel() = 0; | 44 virtual void Cancel() = 0; |
46 | 45 |
47 // Returns the time from the event which closed the menu - or 0. | 46 // Returns the time from the event which closed the menu - or 0. |
48 virtual base::TimeTicks GetClosingEventTime() const = 0; | 47 virtual base::TimeTicks GetClosingEventTime() const = 0; |
49 | 48 |
50 protected: | 49 protected: |
51 // Call Release() to delete. | 50 // Call Release() to delete. |
52 virtual ~MenuRunnerImplInterface() {} | 51 virtual ~MenuRunnerImplInterface() {} |
53 }; | 52 }; |
54 | 53 |
55 } // namespace internal | 54 } // namespace internal |
56 } // namespace views | 55 } // namespace views |
57 | 56 |
58 #endif // UI_VIEWS_CONTROLS_MENU_MENU_RUNNER_IMPL_INTERFACE_H_ | 57 #endif // UI_VIEWS_CONTROLS_MENU_MENU_RUNNER_IMPL_INTERFACE_H_ |
OLD | NEW |