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

Unified Diff: third_party/WebKit/Source/core/exported/WebViewBase.h

Issue 2860673002: Change all test cases to use WebViewBase instead of WebViewImpl. (Closed)
Patch Set: Created 3 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
Index: third_party/WebKit/Source/core/exported/WebViewBase.h
diff --git a/third_party/WebKit/Source/core/exported/WebViewBase.h b/third_party/WebKit/Source/core/exported/WebViewBase.h
index cd286264a72e252b662319d5ed1bfc7cfa7c9cc9..9e62579f25d6c3dbf3e07bde6f6c03728ad9e32f 100644
--- a/third_party/WebKit/Source/core/exported/WebViewBase.h
+++ b/third_party/WebKit/Source/core/exported/WebViewBase.h
@@ -5,6 +5,7 @@
#ifndef WebViewBase_h
#define WebViewBase_h
+#include "core/page/EventWithHitTestResults.h"
#include "platform/transforms/TransformationMatrix.h"
#include "platform/wtf/RefCounted.h"
#include "public/platform/WebDisplayMode.h"
@@ -15,6 +16,7 @@
namespace blink {
class AnimationWorkletProxyClient;
+class BrowserControls;
class ChromeClient;
class CompositorAnimationHost;
class CompositorWorkerProxyClient;
@@ -24,6 +26,7 @@ class DevToolsEmulator;
class Frame;
class GraphicsLayer;
class HitTestResult;
+class LinkHighlightImpl;
class Page;
class PaintLayerCompositor;
class PagePopup;
@@ -63,6 +66,9 @@ class WebViewBase : public WebView, public RefCounted<WebViewBase> {
virtual Page* GetPage() const = 0;
virtual Frame* FocusedCoreFrame() const = 0;
+ PLATFORM_EXPORT static WebViewBase* Create(WebViewClient*,
sashab 2017/05/03 04:05:22 I think BLINK_EXPORT is better than PLATFORM_EXPOR
slangley 2017/05/03 21:43:08 I think because of the layering, PLATFORM_EXPORT m
haraken 2017/05/04 05:30:42 This file is in core/, not platform/. Why can't we
slangley 2017/05/04 09:15:34 CORE_EXPORT has an additional compiler defined con
haraken 2017/05/04 15:14:31 Hmm. Maybe I'm a bit behind. No one in core/ is u
+ WebPageVisibilityState);
+
static WebViewBase* FromPage(Page*);
static HashSet<WebViewBase*>& AllInstances();
@@ -179,6 +185,43 @@ class WebViewBase : public WebView, public RefCounted<WebViewBase> {
virtual HitTestResult CoreHitTestResultAt(const WebPoint&) = 0;
virtual class ChromeClient& ChromeClient() const = 0;
+
+ // These methods are consumed by test code only.
+ virtual BrowserControls& GetBrowserControls() = 0;
sashab 2017/05/03 04:05:22 Make them private? And add the test as a friend cl
slangley 2017/05/03 21:43:08 In general for these changes my idea is: a) Move
+ virtual Element* FocusedElement() const = 0;
+ virtual void EnableFakePageScaleAnimationForTesting(bool) = 0;
+ virtual bool FakeDoubleTapAnimationPendingForTesting() const = 0;
+ virtual void AnimateDoubleTapZoom(const IntPoint&) = 0;
+ virtual WebRect ComputeBlockBound(const WebPoint&, bool ignore_clipping) = 0;
+ virtual void ComputeScaleAndScrollForBlockRect(
+ const WebPoint& hit_point,
+ const WebRect& block_rect,
+ float padding,
+ float default_scale_when_already_legible,
+ float& scale,
+ WebPoint& scroll) = 0;
+ virtual float FakePageScaleAnimationPageScaleForTesting() const = 0;
+ virtual bool FakePageScaleAnimationUseAnchorForTesting() const = 0;
+ virtual IntPoint FakePageScaleAnimationTargetPositionForTesting() const = 0;
+ virtual void ComputeScaleAndScrollForFocusedNode(
+ Node* focused_node,
+ bool zoom_in_to_legible_scale,
+ float& scale,
+ IntPoint& scroll,
+ bool& need_animation) = 0;
+ virtual bool HasHorizontalScrollbar() = 0;
+ virtual bool HasVerticalScrollbar() = 0;
+ virtual TransformationMatrix GetDeviceEmulationTransformForTesting()
+ const = 0;
+ virtual bool MatchesHeuristicsForGpuRasterizationForTesting() const = 0;
+ virtual Node* BestTapNode(
+ const GestureEventWithHitTestResults& targeted_tap_event) = 0;
+ virtual void EnableTapHighlightAtPoint(
+ const GestureEventWithHitTestResults& targeted_tap_event) = 0;
+ virtual LinkHighlightImpl* GetLinkHighlight(int) = 0;
+ virtual unsigned NumLinkHighlights() = 0;
+ virtual void EnableTapHighlights(HeapVector<Member<Node>>&) = 0;
+ PLATFORM_EXPORT static void SetCurrentInputEventForTest(const WebInputEvent*);
haraken 2017/05/04 05:30:42 Ditto.
};
}
« no previous file with comments | « no previous file | third_party/WebKit/Source/web/ExternalPopupMenuTest.cpp » ('j') | third_party/WebKit/Source/web/WebViewImpl.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698