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

Unified Diff: chrome/renderer/external_popup_menu.h

Issue 4078003: Refactoring select popup on Mac.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/render_messages_internal.h ('k') | chrome/renderer/external_popup_menu.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/external_popup_menu.h
===================================================================
--- chrome/renderer/external_popup_menu.h (revision 0)
+++ chrome/renderer/external_popup_menu.h (revision 0)
@@ -0,0 +1,40 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_RENDERER_EXTERNAL_POPUP_MENU_H_
+#define CHROME_RENDERER_EXTERNAL_POPUP_MENU_H_
+
+#include "base/basictypes.h"
+#include "third_party/WebKit/WebKit/chromium/public/WebExternalPopupMenu.h"
+#include "third_party/WebKit/WebKit/chromium/public/WebPopupMenuInfo.h"
+
+class RenderView;
+namespace WebKit {
+class WebExternalPopupMenuClient;
+}
+
+class ExternalPopupMenu : public WebKit::WebExternalPopupMenu {
+ public:
+ ExternalPopupMenu(RenderView* render_view,
+ const WebKit::WebPopupMenuInfo& popup_menu_info,
+ WebKit::WebExternalPopupMenuClient* popup_menu_client);
+
+ // Called when the user has selected an item. |selected_item| is -1 if the
+ // user canceled the popup.
+ void DidSelectItem(int selected_index);
+
+ // WebKit::WebExternalPopupMenu implementation:
+ virtual void show(const WebKit::WebRect& bounds);
+ virtual void close();
+
+ private:
+ RenderView* render_view_;
+ WebKit::WebPopupMenuInfo popup_menu_info_;
+ WebKit::WebExternalPopupMenuClient* popup_menu_client_;
+
+ DISALLOW_COPY_AND_ASSIGN(ExternalPopupMenu);
+};
+
+#endif // CHROME_RENDERER_EXTERNAL_POPUP_MENU_H_
+
« no previous file with comments | « chrome/common/render_messages_internal.h ('k') | chrome/renderer/external_popup_menu.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698