Loosen up heuristics for detecting account creation forms.
[chromium-blink-merge.git] / content / renderer / external_popup_menu.h
blobf039fcfb4b348f1c6a69859fb24f1a3a76ee71d0
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.
5 #ifndef CONTENT_RENDERER_EXTERNAL_POPUP_MENU_H_
6 #define CONTENT_RENDERER_EXTERNAL_POPUP_MENU_H_
8 #include <vector>
10 #include "base/basictypes.h"
11 #include "third_party/WebKit/Source/WebKit/chromium/public/WebExternalPopupMenu.h"
12 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupMenuInfo.h"
14 class RenderViewImpl;
15 namespace WebKit {
16 class WebExternalPopupMenuClient;
19 class ExternalPopupMenu : public WebKit::WebExternalPopupMenu {
20 public:
21 ExternalPopupMenu(RenderViewImpl* render_view,
22 const WebKit::WebPopupMenuInfo& popup_menu_info,
23 WebKit::WebExternalPopupMenuClient* popup_menu_client);
25 virtual ~ExternalPopupMenu() {}
27 #if defined(OS_MACOSX)
28 // Called when the user has selected an item. |selected_item| is -1 if the
29 // user canceled the popup.
30 void DidSelectItem(int selected_index);
31 #endif
33 #if defined(OS_ANDROID)
34 // Called when the user has selected items or canceled the popup.
35 void DidSelectItems(bool canceled, const std::vector<int>& selected_indices);
36 #endif
38 // WebKit::WebExternalPopupMenu implementation:
39 virtual void show(const WebKit::WebRect& bounds);
40 virtual void close();
42 private:
43 RenderViewImpl* render_view_;
44 WebKit::WebPopupMenuInfo popup_menu_info_;
45 WebKit::WebExternalPopupMenuClient* popup_menu_client_;
47 DISALLOW_COPY_AND_ASSIGN(ExternalPopupMenu);
50 #endif // CONTENT_RENDERER_EXTERNAL_POPUP_MENU_H_