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

Side by Side Diff: content/renderer/external_popup_menu.h

Issue 10436010: Multi-select <select> in 'external popup window' (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase after reverts and re-reverts.. Created 8 years, 7 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
1 // Copyright (c) 2011 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 CONTENT_RENDERER_EXTERNAL_POPUP_MENU_H_ 5 #ifndef CONTENT_RENDERER_EXTERNAL_POPUP_MENU_H_
6 #define CONTENT_RENDERER_EXTERNAL_POPUP_MENU_H_ 6 #define CONTENT_RENDERER_EXTERNAL_POPUP_MENU_H_
7 7
8 #include <vector>
9
8 #include "base/basictypes.h" 10 #include "base/basictypes.h"
9 #include "third_party/WebKit/Source/WebKit/chromium/public/WebExternalPopupMenu. h" 11 #include "third_party/WebKit/Source/WebKit/chromium/public/WebExternalPopupMenu. h"
10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupMenuInfo.h" 12 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupMenuInfo.h"
11 13
12 class RenderViewImpl; 14 class RenderViewImpl;
13 namespace WebKit { 15 namespace WebKit {
14 class WebExternalPopupMenuClient; 16 class WebExternalPopupMenuClient;
15 } 17 }
16 18
17 class ExternalPopupMenu : public WebKit::WebExternalPopupMenu { 19 class ExternalPopupMenu : public WebKit::WebExternalPopupMenu {
18 public: 20 public:
19 ExternalPopupMenu(RenderViewImpl* render_view, 21 ExternalPopupMenu(RenderViewImpl* render_view,
20 const WebKit::WebPopupMenuInfo& popup_menu_info, 22 const WebKit::WebPopupMenuInfo& popup_menu_info,
21 WebKit::WebExternalPopupMenuClient* popup_menu_client); 23 WebKit::WebExternalPopupMenuClient* popup_menu_client);
22 24
23 virtual ~ExternalPopupMenu() {} 25 virtual ~ExternalPopupMenu() {}
24 26
25 // Called when the user has selected an item. |selected_item| is -1 if the 27 // Called when the user has selected an item. |selected_item| is -1 if the
26 // user canceled the popup. 28 // user canceled the popup.
27 void DidSelectItem(int selected_index); 29 void DidSelectItem(int selected_index);
Avi (use Gerrit) 2012/05/24 18:41:41 Again, if we mark one for a platform, mark them al
aruslan 2012/05/24 19:53:15 Done.
28 30
31 #if defined(OS_ANDROID)
32 // Called when the user has selected items or canceled the popup.
33 void DidSelectItems(bool canceled, const std::vector<int>& selected_indices);
34 #endif
35
29 // WebKit::WebExternalPopupMenu implementation: 36 // WebKit::WebExternalPopupMenu implementation:
30 virtual void show(const WebKit::WebRect& bounds); 37 virtual void show(const WebKit::WebRect& bounds);
31 virtual void close(); 38 virtual void close();
32 39
33 private: 40 private:
34 RenderViewImpl* render_view_; 41 RenderViewImpl* render_view_;
35 WebKit::WebPopupMenuInfo popup_menu_info_; 42 WebKit::WebPopupMenuInfo popup_menu_info_;
36 WebKit::WebExternalPopupMenuClient* popup_menu_client_; 43 WebKit::WebExternalPopupMenuClient* popup_menu_client_;
37 44
38 DISALLOW_COPY_AND_ASSIGN(ExternalPopupMenu); 45 DISALLOW_COPY_AND_ASSIGN(ExternalPopupMenu);
39 }; 46 };
40 47
41 #endif // CONTENT_RENDERER_EXTERNAL_POPUP_MENU_H_ 48 #endif // CONTENT_RENDERER_EXTERNAL_POPUP_MENU_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698