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

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

Issue 7550038: Rename VIEWS_API to VIEWS_EXPORT. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 4 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 | « views/controls/menu/menu_model_adapter.h ('k') | views/controls/menu/menu_wrapper.h » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 VIEWS_CONTROLS_MENU_MENU_RUNNER_H_ 5 #ifndef VIEWS_CONTROLS_MENU_MENU_RUNNER_H_
6 #define VIEWS_CONTROLS_MENU_MENU_RUNNER_H_ 6 #define VIEWS_CONTROLS_MENU_MENU_RUNNER_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "views/controls/menu/menu_item_view.h" 11 #include "views/controls/menu/menu_item_view.h"
12 12
13 namespace views { 13 namespace views {
14 14
15 class MenuButton; 15 class MenuButton;
16 class Widget; 16 class Widget;
17 17
18 // MenuRunner handles the lifetime of the root MenuItemView. MenuItemView runs a 18 // MenuRunner handles the lifetime of the root MenuItemView. MenuItemView runs a
19 // nested message loop, which means care must be taken when the MenuItemView 19 // nested message loop, which means care must be taken when the MenuItemView
20 // needs to be deleted. MenuRunner makes sure the menu is deleted after the 20 // needs to be deleted. MenuRunner makes sure the menu is deleted after the
21 // nested message loop completes. 21 // nested message loop completes.
22 // 22 //
23 // MenuRunner can be deleted at any time and will correctly handle deleting the 23 // MenuRunner can be deleted at any time and will correctly handle deleting the
24 // underlying menu. 24 // underlying menu.
25 // 25 //
26 // TODO: this is a work around for 57890. If we fix it this class shouldn't be 26 // TODO: this is a work around for 57890. If we fix it this class shouldn't be
27 // needed. 27 // needed.
28 class VIEWS_API MenuRunner { 28 class VIEWS_EXPORT MenuRunner {
29 public: 29 public:
30 explicit MenuRunner(MenuItemView* menu); 30 explicit MenuRunner(MenuItemView* menu);
31 ~MenuRunner(); 31 ~MenuRunner();
32 32
33 // Runs the menu. 33 // Runs the menu.
34 void RunMenuAt(Widget* parent, 34 void RunMenuAt(Widget* parent,
35 MenuButton* button, 35 MenuButton* button,
36 const gfx::Rect& bounds, 36 const gfx::Rect& bounds,
37 MenuItemView::AnchorPosition anchor, 37 MenuItemView::AnchorPosition anchor,
38 bool has_mnemonics); 38 bool has_mnemonics);
39 39
40 private: 40 private:
41 class Holder; 41 class Holder;
42 42
43 Holder* holder_; 43 Holder* holder_;
44 44
45 DISALLOW_COPY_AND_ASSIGN(MenuRunner); 45 DISALLOW_COPY_AND_ASSIGN(MenuRunner);
46 }; 46 };
47 47
48 } // namespace views 48 } // namespace views
49 49
50 #endif // VIEWS_CONTROLS_MENU_MENU_RUNNER_H_ 50 #endif // VIEWS_CONTROLS_MENU_MENU_RUNNER_H_
OLDNEW
« no previous file with comments | « views/controls/menu/menu_model_adapter.h ('k') | views/controls/menu/menu_wrapper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698