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

Side by Side Diff: webkit/glue/webwidget_delegate.h

Issue 67018: Chrome side of the WebKit popup changes. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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
« no previous file with comments | « webkit/glue/chrome_client_impl.cc ('k') | webkit/glue/webwidget_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 WEBKIT_GLUE_WEBWIDGET_DELEGATE_H__ 5 #ifndef WEBKIT_GLUE_WEBWIDGET_DELEGATE_H__
6 #define WEBKIT_GLUE_WEBWIDGET_DELEGATE_H__ 6 #define WEBKIT_GLUE_WEBWIDGET_DELEGATE_H__
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/gfx/native_widget_types.h" 11 #include "base/gfx/native_widget_types.h"
12 #include "base/string16.h" 12 #include "base/string16.h"
13 #include "webkit/glue/window_open_disposition.h" 13 #include "webkit/glue/window_open_disposition.h"
14 14
15 namespace WebKit { 15 namespace WebKit {
16 struct WebRect; 16 struct WebRect;
17 struct WebScreenInfo; 17 struct WebScreenInfo;
18 } 18 }
19 19
20 class WebWidget; 20 class WebWidget;
21 class WebCursor; 21 class WebCursor;
22 struct WebPluginGeometry; 22 struct WebPluginGeometry;
23 23
24 struct MenuItem { 24 struct WebMenuItem {
25 // Container for information about entries in an HTML select popup menu. 25 // Container for information about entries in an HTML select popup menu.
26 // Types must be kept in sync with PopupListBox::ListItemType in 26 // Types must be kept in sync with PopupListBox::ListItemType in
27 // WebCore/platform/chromium/PopupMenuChromium.h. This won't change often 27 // WebCore/platform/chromium/PopupMenuChromium.h. This won't change often
28 // (if ever). 28 // (if ever).
29 enum Type { 29 enum Type {
30 OPTION = 0, 30 OPTION = 0,
31 GROUP, 31 GROUP,
32 SEPARATOR 32 SEPARATOR
33 }; 33 };
34 34
(...skipping 15 matching lines...) Expand all
50 // scrolled by the specified dx and dy amounts. 50 // scrolled by the specified dx and dy amounts.
51 virtual void DidScrollRect(WebWidget* webwidget, int dx, int dy, 51 virtual void DidScrollRect(WebWidget* webwidget, int dx, int dy,
52 const WebKit::WebRect& clip_rect) = 0; 52 const WebKit::WebRect& clip_rect) = 0;
53 53
54 // This method is called to instruct the window containing the WebWidget to 54 // This method is called to instruct the window containing the WebWidget to
55 // show itself as the topmost window. This method is only used after a 55 // show itself as the topmost window. This method is only used after a
56 // successful call to CreateWebWidget. |disposition| indicates how this new 56 // successful call to CreateWebWidget. |disposition| indicates how this new
57 // window should be displayed, but generally only means something for WebViews . 57 // window should be displayed, but generally only means something for WebViews .
58 virtual void Show(WebWidget* webwidget, WindowOpenDisposition disposition) = 0 ; 58 virtual void Show(WebWidget* webwidget, WindowOpenDisposition disposition) = 0 ;
59 59
60 // Used for displaying HTML select elements as popup menus on Mac OS X (other 60 // Used for displaying HTML popup menus on Mac OS X (other platforms will use
61 // platforms will use Show() above). |bounds| represents the positioning on 61 // Show() above). |bounds| represents the positioning on the screen (in WebKit
62 // the screen (in WebKit coordinates, origin at the top left corner) of the 62 // coordinates, origin at the top left corner) of the button that will display
63 // button that will display the menu. It will be used, along with 63 // the menu. It will be used, along with |item_height| (which refers to the
64 // |item_height| (which refers to the size of each entry in the menu), to 64 // size of each entry in the menu), to position the menu on the screen.
65 // position the menu on the screen. |selected_index| indicates the menu item 65 // |selected_index| indicates the menu item that should be drawn as selected
66 // that should be drawn as selected when the menu initially is displayed. 66 // when the menu initially is displayed. |items| contains information about
67 // |items| contains information about each of the entries in the popup menu, 67 // each of the entries in the popup menu, such as the type (separator, option,
68 // such as the type (separator, option, group), the text representation and 68 // group), the text representation and the item's enabled status.
69 // the item's enabled status. 69 virtual void ShowAsPopupWithItems(WebWidget* webwidget,
70 virtual void ShowWithItems(WebWidget* webwidget, 70 const WebKit::WebRect& bounds,
71 const WebKit::WebRect& bounds, 71 int item_height,
72 int item_height, 72 int selected_index,
73 int selected_index, 73 const std::vector<WebMenuItem>& items) = 0;
74 const std::vector<MenuItem>& items) = 0;
75 74
76 // This method is called to instruct the window containing the WebWidget to 75 // This method is called to instruct the window containing the WebWidget to
77 // close. Note: This method should just be the trigger that causes the 76 // close. Note: This method should just be the trigger that causes the
78 // WebWidget to eventually close. It should not actually be destroyed until 77 // WebWidget to eventually close. It should not actually be destroyed until
79 // after this call returns. 78 // after this call returns.
80 virtual void CloseWidgetSoon(WebWidget* webwidget) = 0; 79 virtual void CloseWidgetSoon(WebWidget* webwidget) = 0;
81 80
82 // This method is called to focus the window containing the WebWidget so 81 // This method is called to focus the window containing the WebWidget so
83 // that it receives keyboard events. 82 // that it receives keyboard events.
84 virtual void Focus(WebWidget* webwidget) = 0; 83 virtual void Focus(WebWidget* webwidget) = 0;
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 virtual WebKit::WebScreenInfo GetScreenInfo(WebWidget* webwidget) = 0; 130 virtual WebKit::WebScreenInfo GetScreenInfo(WebWidget* webwidget) = 0;
132 131
133 WebWidgetDelegate() { } 132 WebWidgetDelegate() { }
134 virtual ~WebWidgetDelegate() { } 133 virtual ~WebWidgetDelegate() { }
135 134
136 private: 135 private:
137 DISALLOW_COPY_AND_ASSIGN(WebWidgetDelegate); 136 DISALLOW_COPY_AND_ASSIGN(WebWidgetDelegate);
138 }; 137 };
139 138
140 #endif // #ifndef WEBKIT_GLUE_WEBWIDGET_DELEGATE_H__ 139 #endif // #ifndef WEBKIT_GLUE_WEBWIDGET_DELEGATE_H__
OLDNEW
« no previous file with comments | « webkit/glue/chrome_client_impl.cc ('k') | webkit/glue/webwidget_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698