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

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

Issue 16979002: Add ContextMenuSourceType to views::ContextMenuController::ShowContextMenuForView. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: patch Created 7 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
« no previous file with comments | « ui/views/controls/menu/menu_delegate.cc ('k') | ui/views/controls/menu/menu_runner.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_H_ 5 #ifndef UI_VIEWS_CONTROLS_MENU_MENU_RUNNER_H_
6 #define UI_VIEWS_CONTROLS_MENU_MENU_RUNNER_H_ 6 #define UI_VIEWS_CONTROLS_MENU_MENU_RUNNER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 // Runs the menu. |types| is a bitmask of RunTypes. If this returns 88 // Runs the menu. |types| is a bitmask of RunTypes. If this returns
89 // MENU_DELETED the method is returning because the MenuRunner was deleted. 89 // MENU_DELETED the method is returning because the MenuRunner was deleted.
90 // Typically callers should NOT do any processing if this returns 90 // Typically callers should NOT do any processing if this returns
91 // MENU_DELETED. 91 // MENU_DELETED.
92 // If |anchor| uses a |BUBBLE_..| type, the bounds will get determined by 92 // If |anchor| uses a |BUBBLE_..| type, the bounds will get determined by
93 // using |bounds| as the thing to point at in screen coordinates. 93 // using |bounds| as the thing to point at in screen coordinates.
94 RunResult RunMenuAt(Widget* parent, 94 RunResult RunMenuAt(Widget* parent,
95 MenuButton* button, 95 MenuButton* button,
96 const gfx::Rect& bounds, 96 const gfx::Rect& bounds,
97 MenuItemView::AnchorPosition anchor, 97 MenuItemView::AnchorPosition anchor,
98 ui::MenuSourceType source_type,
98 int32 types) WARN_UNUSED_RESULT; 99 int32 types) WARN_UNUSED_RESULT;
99 100
100 // Returns true if we're in a nested message loop running the menu. 101 // Returns true if we're in a nested message loop running the menu.
101 bool IsRunning() const; 102 bool IsRunning() const;
102 103
103 // Hides and cancels the menu. This does nothing if the menu is not open. 104 // Hides and cancels the menu. This does nothing if the menu is not open.
104 void Cancel(); 105 void Cancel();
105 106
106 // Returns the time from the event which closed the menu - or 0. 107 // Returns the time from the event which closed the menu - or 0.
107 base::TimeDelta closing_event_time() const; 108 base::TimeDelta closing_event_time() const;
(...skipping 24 matching lines...) Expand all
132 133
133 protected: 134 protected:
134 DisplayChangeListener() {} 135 DisplayChangeListener() {}
135 }; 136 };
136 137
137 } 138 }
138 139
139 } // namespace views 140 } // namespace views
140 141
141 #endif // UI_VIEWS_CONTROLS_MENU_MENU_RUNNER_H_ 142 #endif // UI_VIEWS_CONTROLS_MENU_MENU_RUNNER_H_
OLDNEW
« no previous file with comments | « ui/views/controls/menu/menu_delegate.cc ('k') | ui/views/controls/menu/menu_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698