blob: ef83d07131046578ebb5d4a655247cd272d2651b [file] [log] [blame]
[email protected]caf706f2010-10-26 17:54:081// 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
[email protected]55722152011-03-22 01:33:535#ifndef CONTENT_RENDERER_EXTERNAL_POPUP_MENU_H_
6#define CONTENT_RENDERER_EXTERNAL_POPUP_MENU_H_
[email protected]caf706f2010-10-26 17:54:087
8#include "base/basictypes.h"
[email protected]8bd0fe62011-01-17 06:44:379#include "third_party/WebKit/Source/WebKit/chromium/public/WebExternalPopupMenu.h"
10#include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupMenuInfo.h"
[email protected]caf706f2010-10-26 17:54:0811
12class RenderView;
13namespace WebKit {
14class WebExternalPopupMenuClient;
15}
16
17class ExternalPopupMenu : public WebKit::WebExternalPopupMenu {
18 public:
19 ExternalPopupMenu(RenderView* render_view,
20 const WebKit::WebPopupMenuInfo& popup_menu_info,
21 WebKit::WebExternalPopupMenuClient* popup_menu_client);
22
23 // Called when the user has selected an item. |selected_item| is -1 if the
24 // user canceled the popup.
25 void DidSelectItem(int selected_index);
26
27 // WebKit::WebExternalPopupMenu implementation:
28 virtual void show(const WebKit::WebRect& bounds);
29 virtual void close();
30
31 private:
32 RenderView* render_view_;
33 WebKit::WebPopupMenuInfo popup_menu_info_;
34 WebKit::WebExternalPopupMenuClient* popup_menu_client_;
35
36 DISALLOW_COPY_AND_ASSIGN(ExternalPopupMenu);
37};
38
[email protected]55722152011-03-22 01:33:5339#endif // CONTENT_RENDERER_EXTERNAL_POPUP_MENU_H_