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

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

Issue 10024066: TabContents -> WebContentsImpl, part 4. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 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 | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_BROWSER_TAB_CONTENTS_POPUP_MENU_HELPER_MAC_H_
6 #define CONTENT_BROWSER_TAB_CONTENTS_POPUP_MENU_HELPER_MAC_H_
7
8 #include <vector>
9
10 #include "base/compiler_specific.h"
11 #include "content/public/browser/notification_observer.h"
12 #include "content/public/browser/notification_registrar.h"
13 #include "ui/gfx/rect.h"
14
15 struct WebMenuItem;
16
17 namespace content {
18 class RenderViewHost;
19 class RenderViewHostImpl;
20 }
21
22 class PopupMenuHelper : public content::NotificationObserver {
23 public:
24 // Creates a PopupMenuHelper that will notify |render_view_host| when a user
25 // selects or cancels the popup.
26 explicit PopupMenuHelper(content::RenderViewHost* render_view_host);
27
28 // Shows the popup menu and notifies the RenderViewHost of the selection/
29 // cancel.
30 // This call is blocking.
31 void ShowPopupMenu(const gfx::Rect& bounds,
32 int item_height,
33 double item_font_size,
34 int selected_item,
35 const std::vector<WebMenuItem>& items,
36 bool right_aligned);
37
38 private:
39 // content::NotificationObserver implementation:
40 virtual void Observe(int type,
41 const content::NotificationSource& source,
42 const content::NotificationDetails& details) OVERRIDE;
43
44 content::NotificationRegistrar notification_registrar_;
45
46 content::RenderViewHostImpl* render_view_host_;
47
48 DISALLOW_COPY_AND_ASSIGN(PopupMenuHelper);
49 };
50
51 #endif // CONTENT_BROWSER_TAB_CONTENTS_POPUP_MENU_HELPER_MAC_H_
OLDNEW
« no previous file with comments | « content/browser/renderer_host/test_render_view_host.cc ('k') | content/browser/tab_contents/popup_menu_helper_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698