Index: ui/views/controls/menu/menu_runner_impl_interface.h |
diff --git a/ui/views/controls/menu/menu_runner_impl_interface.h b/ui/views/controls/menu/menu_runner_impl_interface.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..2992e31d3d99d18feb976f8e7744a69f55ae2baf |
--- /dev/null |
+++ b/ui/views/controls/menu/menu_runner_impl_interface.h |
@@ -0,0 +1,39 @@ |
+// Copyright 2014 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef UI_VIEWS_CONTROLS_MENU_MENU_RUNNER_IMPL_INTERFACE_H_ |
+#define UI_VIEWS_CONTROLS_MENU_MENU_RUNNER_IMPL_INTERFACE_H_ |
+ |
+#include "ui/views/controls/menu/menu_runner.h" |
+ |
+namespace views { |
+namespace internal { |
+ |
+// Manages the menu. To destroy a MenuRunnerImpl invoke Release(). Release() |
+// deletes immediately if the menu isn't showing. If the menu is showing |
+// Release() cancels the menu and when the nested RunMenuAt() call returns |
+// deletes itself and the menu. |
+class MenuRunnerImplInterface { |
+ public: |
+ virtual bool running() const = 0; |
tapted
2014/06/25 08:30:28
nit: comment
|
+ |
+ // See description above class for details. |
+ virtual void Release() = 0; |
+ |
+ // Runs the menu. |
+ virtual MenuRunner::RunResult RunMenuAt(Widget* parent, |
+ MenuButton* button, |
+ const gfx::Rect& bounds, |
+ MenuAnchorPosition anchor, |
+ int32 types) WARN_UNUSED_RESULT = 0; |
+ virtual void Cancel() = 0; |
tapted
2014/06/25 08:30:28
nit: comment
|
+ |
+ // Returns the time from the event which closed the menu - or 0. |
+ virtual base::TimeDelta closing_event_time() const = 0; |
+}; |
+ |
+} // namespace internal |
+} // namespace views |
+ |
+#endif // UI_VIEWS_CONTROLS_MENU_MENU_RUNNER_IMPL_INTERFACE_H_ |