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

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

Issue 331993009: MacViews: Run native Cocoa context menus to support Services. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
OLDNEW
(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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698