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

Unified Diff: webkit/tools/test_shell/test_shell.cc

Issue 149620: Use WebWidget from the WebKit API. This change also makes... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 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/test_shell.h ('k') | webkit/tools/test_shell/test_shell_gtk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/tools/test_shell/test_shell.cc
===================================================================
--- webkit/tools/test_shell/test_shell.cc (revision 20851)
+++ webkit/tools/test_shell/test_shell.cc (working copy)
@@ -43,11 +43,11 @@
#include "webkit/glue/webkit_glue.h"
#include "webkit/glue/webpreferences.h"
#include "webkit/glue/webview.h"
-#include "webkit/glue/webwidget.h"
#include "webkit/tools/test_shell/simple_resource_loader_bridge.h"
#include "webkit/tools/test_shell/test_navigation_controller.h"
#include "webkit/tools/test_shell/test_shell_switches.h"
+using WebKit::WebNavigationPolicy;
using WebKit::WebRect;
using WebKit::WebSize;
using WebKit::WebURLRequest;
@@ -112,6 +112,7 @@
is_modal_(false),
dump_stats_table_on_exit_(false) {
delegate_ = new TestWebViewDelegate(this);
+ popup_delegate_ = new TestWebViewDelegate(this);
layout_test_controller_.reset(new LayoutTestController(this));
event_sending_controller_.reset(new EventSendingController(this));
text_input_controller_.reset(new TextInputController(this));
@@ -247,13 +248,13 @@
// static
std::string TestShell::DumpImage(WebView* view,
const std::wstring& file_name, const std::string& pixel_hash) {
- view->Layout();
- const WebSize& size = view->GetSize();
+ view->layout();
+ const WebSize& size = view->size();
skia::PlatformCanvas canvas;
if (!canvas.initialize(size.width, size.height, true))
return std::string();
- view->Paint(&canvas, WebRect(0, 0, size.width, size.height));
+ view->paint(&canvas, WebRect(0, 0, size.width, size.height));
skia::BitmapPlatformDevice& device =
static_cast<skia::BitmapPlatformDevice&>(canvas.getTopPlatformDevice());
@@ -434,8 +435,8 @@
return false;
}
-void TestShell::Show(WebView* webview, WindowOpenDisposition disposition) {
- delegate_->Show(webview, disposition);
+void TestShell::Show(WebNavigationPolicy policy) {
+ delegate_->show(policy);
}
void TestShell::BindJSObjectsToWindow(WebFrame* frame) {
@@ -590,13 +591,13 @@
if (enable) {
if (m_focusedWidgetHost != host) {
if (m_focusedWidgetHost)
- m_focusedWidgetHost->webwidget()->SetFocus(false);
- host->webwidget()->SetFocus(enable);
+ m_focusedWidgetHost->webwidget()->setFocus(false);
+ host->webwidget()->setFocus(enable);
m_focusedWidgetHost = host;
}
} else {
if (m_focusedWidgetHost == host) {
- host->webwidget()->SetFocus(enable);
+ host->webwidget()->setFocus(enable);
m_focusedWidgetHost = NULL;
}
}
« no previous file with comments | « webkit/tools/test_shell/test_shell.h ('k') | webkit/tools/test_shell/test_shell_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698