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

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

Issue 99088: Style fixes for previous review (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/webmenurunner_mac.mm ('k') | no next file » | 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 14785)
+++ webkit/tools/test_shell/mac/test_webview_delegate.mm (working copy)
@@ -5,8 +5,8 @@
#include "webkit/tools/test_shell/test_webview_delegate.h"
#import <Cocoa/Cocoa.h>
+#include "base/string_util.h"
#include "base/sys_string_conversions.h"
-#include "base/string_util.h"
#include "third_party/WebKit/WebKit/chromium/public/WebRect.h"
#include "webkit/glue/webcursor.h"
#include "webkit/glue/webview.h"
@@ -79,8 +79,8 @@
bounds.width, bounds.height);
// Display the menu.
- WebMenuRunner* menu_runner =
- [[[WebMenuRunner alloc] initWithItems:items] autorelease];
+ scoped_nsobject<WebMenuRunner> menu_runner;
+ menu_runner.reset([[WebMenuRunner alloc] initWithItems:items]);
[menu_runner runMenuInView:shell_->webViewWnd()
withBounds:position
@@ -91,11 +91,12 @@
// position based on the selected index and provided bounds.
WebWidgetHost* popup = shell_->popupHost();
int window_num = [shell_->mainWnd() windowNumber];
+ NSEvent* event =
+ webkit_glue::EventWithMenuAction([menu_runner menuItemWasChosen],
+ window_num, item_height,
+ [menu_runner indexOfSelectedItem],
+ position, view_rect);
- NSEvent* event = CreateEventForMenuAction([menu_runner menuItemWasChosen],
- window_num, item_height,
- [menu_runner indexOfSelectedItem],
- position, view_rect);
if ([menu_runner menuItemWasChosen]) {
// Construct a mouse up event to simulate the selection of an appropriate
// menu item.
« no previous file with comments | « webkit/glue/webmenurunner_mac.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698