Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1339)

Side by Side Diff: ui/views/controls/menu/menu_runner_impl_interface.h

Issue 2790773002: Cleanup MenuRunner API (Closed)
Patch Set: Rebase Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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_
OLDNEW
« no previous file with comments | « ui/views/controls/menu/menu_runner_impl_cocoa.mm ('k') | ui/views/controls/menu/menu_runner_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698