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

Unified Diff: sky/engine/public/web/WebViewClient.h

Issue 880643007: Merge WebWidgetClient into WebViewClient. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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 | « sky/engine/public/web/WebTouchAction.h ('k') | sky/engine/public/web/WebWidgetClient.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/public/web/WebViewClient.h
diff --git a/sky/engine/public/web/WebViewClient.h b/sky/engine/public/web/WebViewClient.h
index 07abf6de84764510b231fda1b50bcefefa15ab32..2f0255e62821b0bf903e5585ed0a6cc3193cdc57 100644
--- a/sky/engine/public/web/WebViewClient.h
+++ b/sky/engine/public/web/WebViewClient.h
@@ -33,12 +33,14 @@
#include "../platform/WebGraphicsContext3D.h"
#include "../platform/WebString.h"
+#include "sky/engine/public/platform/WebCommon.h"
+#include "sky/engine/public/platform/WebRect.h"
+#include "sky/engine/public/platform/WebScreenInfo.h"
#include "sky/engine/public/web/WebFrame.h"
#include "sky/engine/public/web/WebNavigatorContentUtilsClient.h"
#include "sky/engine/public/web/WebPageVisibilityState.h"
#include "sky/engine/public/web/WebTextAffinity.h"
#include "sky/engine/public/web/WebTextDirection.h"
-#include "sky/engine/public/web/WebWidgetClient.h"
namespace blink {
@@ -58,13 +60,33 @@ struct WebPoint;
struct WebRect;
struct WebSize;
-// Since a WebView is a WebWidget, a WebViewClient is a WebWidgetClient.
-// Virtual inheritance allows an implementation of WebWidgetClient to be
-// easily reused as part of an implementation of WebViewClient.
-class WebViewClient : virtual public WebWidgetClient {
+class WebViewClient {
public:
virtual ServiceProvider& services() = 0;
+ // Initialize compositing for this widget.
+ virtual void initializeLayerTreeView() { BLINK_ASSERT_NOT_REACHED(); };
+
+ // Called when the page should pump a frame.
+ virtual void scheduleAnimation() { }
+
+ // TODO(esprehn): Sky needs to implement these to control the mojo::View.
+
+ // Called to get/set the position of the widget in screen coordinates.
+ virtual WebRect windowRect() { return WebRect(); }
+ virtual void setWindowRect(const WebRect&) { }
+
+ // Called to get the position of the root window containing the widget
+ // in screen coordinates.
+ virtual WebRect rootWindowRect() { return WebRect(); }
+
+ // Called to query information about the screen where this widget is
+ // displayed.
+ virtual WebScreenInfo screenInfo() { return WebScreenInfo(); }
+
+ // Called to get the scale factor of the display.
+ virtual float deviceScaleFactor() { return 1; }
+
// Editing -------------------------------------------------------------
// This method is called in response to WebView's handleInputEvent()
« no previous file with comments | « sky/engine/public/web/WebTouchAction.h ('k') | sky/engine/public/web/WebWidgetClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698