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

Unified Diff: webkit/glue/webworker_impl.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/glue/webwidget_impl.cc ('k') | webkit/glue/window_open_disposition.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/webworker_impl.cc
===================================================================
--- webkit/glue/webworker_impl.cc (revision 20851)
+++ webkit/glue/webworker_impl.cc (working copy)
@@ -34,6 +34,9 @@
#include "webkit/glue/webworker_impl.h"
using WebKit::WebCursorInfo;
+using WebKit::WebNavigationPolicy;
+using WebKit::WebRect;
+using WebKit::WebScreenInfo;
using WebKit::WebString;
using WebKit::WebURL;
using WebKit::WebWorker;
@@ -46,39 +49,33 @@
class WorkerWebViewDelegate : public WebViewDelegate {
public:
WorkerWebViewDelegate() {}
- virtual void Blur(WebWidget *webwidget) { }
- virtual void CloseWidgetSoon(WebWidget *webwidget) { }
- virtual void DidInvalidateRect(WebWidget *webwidget,
- const WebKit::WebRect &rect) { }
- virtual void DidMove(WebWidget *webwidget, const WebPluginGeometry &move) { }
- virtual void DidScrollRect(WebWidget *webwidget, int dx, int dy,
- const WebKit::WebRect &clip_rect) { }
- virtual void Focus(WebWidget *webwidget) { }
- virtual void GetRootWindowRect(WebWidget *webwidget,
- WebKit::WebRect *rect) { }
- virtual void GetRootWindowResizerRect(WebWidget *webwidget,
- WebKit::WebRect *rect) { }
- virtual WebKit::WebScreenInfo GetScreenInfo(WebWidget *webwidget) {
- WebKit::WebScreenInfo info;
- return info;
- }
- virtual void GetWindowRect(WebWidget *webwidget, WebKit::WebRect *rect) { }
- virtual bool IsHidden(WebWidget *webwidget) { return true; }
- virtual void RunModal(WebWidget *webwidget) { }
- virtual void SetCursor(WebWidget *webwidget, const WebCursorInfo &cursor) { }
- virtual void SetWindowRect(WebWidget *webwidget,
- const WebKit::WebRect &rect) { }
- virtual void Show(WebWidget *webwidget, WindowOpenDisposition disposition) { }
+
+ virtual void didInvalidateRect(const WebRect&) {}
+ virtual void didScrollRect(int dx, int dy, const WebRect& clipRect) {}
+ virtual void didFocus() {}
+ virtual void didBlur() {}
+ virtual void didChangeCursor(const WebCursorInfo&) {}
+ virtual void closeWidgetSoon() {}
+ virtual void show(WebNavigationPolicy) {}
+ virtual void runModal() {}
+ virtual WebRect windowRect() { return WebRect(); }
+ virtual void setWindowRect(const WebRect&) {}
+ virtual WebRect windowResizerRect() { return WebRect(); }
+ virtual WebRect rootWindowRect() { return WebRect(); }
+ virtual WebScreenInfo screenInfo() { return WebScreenInfo(); }
+
// Tell the loader to load the data into the 'shadow page' synchronously,
// so we can grab the resulting Document right after load.
virtual void DidCreateDataSource(WebFrame* frame, WebKit::WebDataSource* ds) {
static_cast<WebDataSourceImpl*>(ds)->setDeferMainResourceDataLoad(false);
}
+
// Lazy allocate and leak this instance.
static WorkerWebViewDelegate* worker_delegate() {
static WorkerWebViewDelegate* worker_delegate = new WorkerWebViewDelegate();
return worker_delegate;
}
+
private:
DISALLOW_COPY_AND_ASSIGN(WorkerWebViewDelegate);
};
@@ -116,7 +113,7 @@
}
WebWorkerImpl::~WebWorkerImpl() {
- web_view_->Close();
+ web_view_->close();
}
void WebWorkerImpl::PostMessageToWorkerContextTask(
« no previous file with comments | « webkit/glue/webwidget_impl.cc ('k') | webkit/glue/window_open_disposition.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698