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

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

Issue 196128: Hook up WebViewClient, part 1.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 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/tools/test_shell/layout_test_controller.cc ('k') | webkit/tools/test_shell/test_shell.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 26230)
+++ webkit/tools/test_shell/mac/test_webview_delegate.mm (working copy)
@@ -8,6 +8,7 @@
#include "base/string_util.h"
#include "base/sys_string_conversions.h"
#include "webkit/api/public/WebCursorInfo.h"
+#include "webkit/api/public/WebPopupMenu.h"
#include "webkit/glue/webcursor.h"
#include "webkit/glue/webview.h"
#include "webkit/glue/plugins/plugin_list.h"
@@ -17,31 +18,20 @@
using WebKit::WebCursorInfo;
using WebKit::WebNavigationPolicy;
+using WebKit::WebPopupMenu;
using WebKit::WebPopupMenuInfo;
using WebKit::WebRect;
using WebKit::WebWidget;
-// WebViewDelegate ------------------------------------------------------------
+// WebViewClient --------------------------------------------------------------
-WebWidget* TestWebViewDelegate::CreatePopupWidgetWithInfo(
- WebView* webview,
+WebWidget* TestWebViewDelegate::createPopupMenu(
const WebPopupMenuInfo& info) {
- WebWidget* webwidget = shell_->CreatePopupWidget(webview);
+ WebWidget* webwidget = shell_->CreatePopupWidget();
popup_menu_info_.reset(new WebPopupMenuInfo(info));
return webwidget;
}
-void TestWebViewDelegate::ShowJavaScriptAlert(const std::wstring& message) {
- NSString *text =
- [NSString stringWithUTF8String:WideToUTF8(message).c_str()];
- NSAlert *alert = [NSAlert alertWithMessageText:@"JavaScript Alert"
- defaultButton:@"OK"
- alternateButton:nil
- otherButton:nil
- informativeTextWithFormat:text];
- [alert runModal];
-}
-
// WebWidgetClient ------------------------------------------------------------
void TestWebViewDelegate::show(WebNavigationPolicy policy) {
@@ -215,6 +205,17 @@
// Private methods ------------------------------------------------------------
+void TestWebViewDelegate::ShowJavaScriptAlert(const std::wstring& message) {
+ NSString *text =
+ [NSString stringWithUTF8String:WideToUTF8(message).c_str()];
+ NSAlert *alert = [NSAlert alertWithMessageText:@"JavaScript Alert"
+ defaultButton:@"OK"
+ alternateButton:nil
+ otherButton:nil
+ informativeTextWithFormat:text];
+ [alert runModal];
+}
+
void TestWebViewDelegate::SetPageTitle(const std::wstring& title) {
[[shell_->webViewHost()->view_handle() window]
setTitle:[NSString stringWithUTF8String:WideToUTF8(title).c_str()]];
« no previous file with comments | « webkit/tools/test_shell/layout_test_controller.cc ('k') | webkit/tools/test_shell/test_shell.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698