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

Side by Side Diff: chrome/browser/tab_contents/popup_menu_helper_mac.h

Issue 4078003: Refactoring select popup on Mac.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 1 month 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 (c) 2010 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 CHROME_BROWSER_TAB_CONTENTS_POPUP_MENU_HELPER_MAC_H_
6 #define CHROME_BROWSER_TAB_CONTENTS_POPUP_MENU_HELPER_MAC_H_
7
8 #include <vector>
9
10 #include "chrome/common/notification_observer.h"
11 #include "chrome/common/notification_registrar.h"
12 #include "gfx/rect.h"
13
14 class RenderViewHost;
15 struct WebMenuItem;
16
17 class PopupMenuHelper : public NotificationObserver {
18 public:
19 // Creates a PopupMenuHelper that will notify |render_view_host| when a user
20 // selects or cancels the popup.
21 explicit PopupMenuHelper(RenderViewHost* render_view_host);
22
23 // Shows the popup menu and notifies the RenderViewHost of the selection/
24 // cancel.
25 // This call is blocking.
26 void ShowPopupMenu(const gfx::Rect& bounds,
27 int item_height,
28 double item_font_size,
29 int selected_item,
30 const std::vector<WebMenuItem>& items,
31 bool right_aligned);
32
33 private:
34 // NotificationObserver implementation:
35 virtual void Observe(NotificationType type,
36 const NotificationSource& source,
37 const NotificationDetails& details);
38
39 NotificationRegistrar notification_registrar_;
40
41 RenderViewHost* render_view_host_;
42
43 DISALLOW_COPY_AND_ASSIGN(PopupMenuHelper);
44 };
45
46 #endif // CHROME_BROWSER_TAB_CONTENTS_POPUP_MENU_HELPER_MAC_H_
OLDNEW
« no previous file with comments | « chrome/browser/tab_contents/interstitial_page.cc ('k') | chrome/browser/tab_contents/popup_menu_helper_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698