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

Side by Side Diff: Source/web/WebViewImpl.h

Issue 929213004: Plumb selection bounds as a single unit (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix test Created 5 years, 9 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 class DeprecatedPaintLayerCompositor; 75 class DeprecatedPaintLayerCompositor;
76 class TopControls; 76 class TopControls;
77 class UserGestureToken; 77 class UserGestureToken;
78 class WebActiveGestureAnimation; 78 class WebActiveGestureAnimation;
79 class WebDevToolsAgentImpl; 79 class WebDevToolsAgentImpl;
80 class WebLayerTreeView; 80 class WebLayerTreeView;
81 class WebLocalFrameImpl; 81 class WebLocalFrameImpl;
82 class WebImage; 82 class WebImage;
83 class WebPagePopupImpl; 83 class WebPagePopupImpl;
84 class WebPlugin; 84 class WebPlugin;
85 class WebSelection;
85 class WebSettingsImpl; 86 class WebSettingsImpl;
86 87
87 struct WebSelectionBound;
88
89 class WebViewImpl final : public WebView 88 class WebViewImpl final : public WebView
90 , public RefCounted<WebViewImpl> 89 , public RefCounted<WebViewImpl>
91 , public WebGestureCurveTarget 90 , public WebGestureCurveTarget
92 , public PageWidgetEventHandler { 91 , public PageWidgetEventHandler {
93 public: 92 public:
94 static WebViewImpl* create(WebViewClient*); 93 static WebViewImpl* create(WebViewClient*);
95 94
96 // WebWidget methods: 95 // WebWidget methods:
97 virtual void close() override; 96 virtual void close() override;
98 virtual WebSize size() override; 97 virtual WebSize size() override;
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
483 482
484 void enableFakePageScaleAnimationForTesting(bool); 483 void enableFakePageScaleAnimationForTesting(bool);
485 bool fakeDoubleTapAnimationPendingForTesting() const { return m_doubleTapZoo mPending; } 484 bool fakeDoubleTapAnimationPendingForTesting() const { return m_doubleTapZoo mPending; }
486 IntPoint fakePageScaleAnimationTargetPositionForTesting() const { return m_f akePageScaleAnimationTargetPosition; } 485 IntPoint fakePageScaleAnimationTargetPositionForTesting() const { return m_f akePageScaleAnimationTargetPosition; }
487 float fakePageScaleAnimationPageScaleForTesting() const { return m_fakePageS caleAnimationPageScaleFactor; } 486 float fakePageScaleAnimationPageScaleForTesting() const { return m_fakePageS caleAnimationPageScaleFactor; }
488 bool fakePageScaleAnimationUseAnchorForTesting() const { return m_fakePageSc aleAnimationUseAnchor; } 487 bool fakePageScaleAnimationUseAnchorForTesting() const { return m_fakePageSc aleAnimationUseAnchor; }
489 488
490 void enterFullScreenForElement(Element*); 489 void enterFullScreenForElement(Element*);
491 void exitFullScreenForElement(Element*); 490 void exitFullScreenForElement(Element*);
492 491
493 void clearCompositedSelectionBounds(); 492 void clearCompositedSelection();
494 void updateCompositedSelectionBounds(const WebSelectionBound& anchor, const WebSelectionBound& focus); 493 void updateCompositedSelection(const WebSelection&);
495 494
496 // Exposed for the purpose of overriding device metrics. 495 // Exposed for the purpose of overriding device metrics.
497 void sendResizeEventAndRepaint(); 496 void sendResizeEventAndRepaint();
498 497
499 // Exposed for testing purposes. 498 // Exposed for testing purposes.
500 bool hasHorizontalScrollbar(); 499 bool hasHorizontalScrollbar();
501 bool hasVerticalScrollbar(); 500 bool hasVerticalScrollbar();
502 501
503 // Pointer Lock calls allow a page to capture all mouse events and 502 // Pointer Lock calls allow a page to capture all mouse events and
504 // disable the system cursor. 503 // disable the system cursor.
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
790 }; 789 };
791 790
792 DEFINE_TYPE_CASTS(WebViewImpl, WebWidget, widget, widget->isWebView(), widget.is WebView()); 791 DEFINE_TYPE_CASTS(WebViewImpl, WebWidget, widget, widget->isWebView(), widget.is WebView());
793 // We have no ways to check if the specified WebView is an instance of 792 // We have no ways to check if the specified WebView is an instance of
794 // WebViewImpl because WebViewImpl is the only implementation of WebView. 793 // WebViewImpl because WebViewImpl is the only implementation of WebView.
795 DEFINE_TYPE_CASTS(WebViewImpl, WebView, webView, true, true); 794 DEFINE_TYPE_CASTS(WebViewImpl, WebView, webView, true, true);
796 795
797 } // namespace blink 796 } // namespace blink
798 797
799 #endif 798 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698