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

Unified Diff: webkit/tools/test_shell/mac/test_webview_delegate.mm

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/glue/webwidget_impl.cc ('k') | webkit/tools/test_shell/test_webview_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/tools/test_shell/mac/test_webview_delegate.mm
===================================================================
--- webkit/tools/test_shell/mac/test_webview_delegate.mm (revision 13487)
+++ webkit/tools/test_shell/mac/test_webview_delegate.mm (working copy)
@@ -27,15 +27,17 @@
NSMenu* menu_; // Non-owning
BOOL menuItemWasChosen_;
}
-- (id)initWithItems:(const std::vector<MenuItem>&)items forMenu:(NSMenu*)menu;
-- (void)addItem:(const MenuItem&)item;
+- (id)initWithItems:(const std::vector<WebMenuItem>&)items
+ forMenu:(NSMenu*)menu;
+- (void)addItem:(const WebMenuItem&)item;
- (BOOL)menuItemWasChosen;
- (void)menuItemSelected:(id)sender;
@end
@implementation MenuDelegate
-- (id)initWithItems:(const std::vector<MenuItem>&)items forMenu:(NSMenu*)menu {
+- (id)initWithItems:(const std::vector<WebMenuItem>&)items
+ forMenu:(NSMenu*)menu {
if ((self = [super init])) {
menu_ = menu;
menuItemWasChosen_ = NO;
@@ -45,8 +47,8 @@
return self;
}
-- (void)addItem:(const MenuItem&)item {
- if (item.type == MenuItem::SEPARATOR) {
+- (void)addItem:(const WebMenuItem&)item {
+ if (item.type == WebMenuItem::SEPARATOR) {
[menu_ addItem:[NSMenuItem separatorItem]];
return;
}
@@ -55,7 +57,7 @@
NSMenuItem* menu_item = [menu_ addItemWithTitle:title
action:@selector(menuItemSelected:)
keyEquivalent:@""];
- [menu_item setEnabled:(item.enabled && item.type != MenuItem::GROUP)];
+ [menu_item setEnabled:(item.enabled && item.type != WebMenuItem::GROUP)];
[menu_item setTarget:self];
}
@@ -122,12 +124,12 @@
}
// Display a HTML select menu.
-void TestWebViewDelegate::ShowWithItems(
+void TestWebViewDelegate::ShowAsPopupWithItems(
WebWidget* webview,
const WebRect& bounds,
int item_height,
int selected_index,
- const std::vector<MenuItem>& items) {
+ const std::vector<WebMenuItem>& items) {
// Populate the menu.
NSMenu* menu = [[[NSMenu alloc] initWithTitle:@""] autorelease];
[menu setAutoenablesItems:NO];
« no previous file with comments | « webkit/glue/webwidget_impl.cc ('k') | webkit/tools/test_shell/test_webview_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698