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

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

Issue 889803004: Add touchpad pinch zoom support to Blink (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Update tests Created 5 years, 10 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 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 virtual void acceptLanguagesChanged() override; 280 virtual void acceptLanguagesChanged() override;
281 281
282 // WebViewImpl 282 // WebViewImpl
283 void enableViewport(); 283 void enableViewport();
284 void disableViewport(); 284 void disableViewport();
285 285
286 float defaultMinimumPageScaleFactor() const; 286 float defaultMinimumPageScaleFactor() const;
287 float defaultMaximumPageScaleFactor() const; 287 float defaultMaximumPageScaleFactor() const;
288 float minimumPageScaleFactor() const; 288 float minimumPageScaleFactor() const;
289 float maximumPageScaleFactor() const; 289 float maximumPageScaleFactor() const;
290 float clampPageScaleFactorToLimits(float) const;
290 291
291 HitTestResult coreHitTestResultAt(const WebPoint&); 292 HitTestResult coreHitTestResultAt(const WebPoint&);
292 void suppressInvalidations(bool enable); 293 void suppressInvalidations(bool enable);
293 void invalidateRect(const IntRect&); 294 void invalidateRect(const IntRect&);
294 295
295 void setIgnoreInputEvents(bool newValue); 296 void setIgnoreInputEvents(bool newValue);
296 void setBackgroundColorOverride(WebColor); 297 void setBackgroundColorOverride(WebColor);
297 void setZoomFactorOverride(float); 298 void setZoomFactorOverride(float);
298 299
299 Color baseBackgroundColor() const { return m_baseBackgroundColor; } 300 Color baseBackgroundColor() const { return m_baseBackgroundColor; }
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
530 void setPageScaleFactorAndLocation(float, const FloatPoint&); 531 void setPageScaleFactorAndLocation(float, const FloatPoint&);
531 532
532 void scrollAndRescaleViewports(float scaleFactor, const IntPoint& mainFrameO rigin, const FloatPoint& pinchViewportOrigin); 533 void scrollAndRescaleViewports(float scaleFactor, const IntPoint& mainFrameO rigin, const FloatPoint& pinchViewportOrigin);
533 534
534 IntRect visibleRectInDocument() const; 535 IntRect visibleRectInDocument() const;
535 536
536 float legibleScale() const; 537 float legibleScale() const;
537 void refreshPageScaleFactorAfterLayout(); 538 void refreshPageScaleFactorAfterLayout();
538 void resumeTreeViewCommits(); 539 void resumeTreeViewCommits();
539 void setUserAgentPageScaleConstraints(PageScaleConstraints newConstraints); 540 void setUserAgentPageScaleConstraints(PageScaleConstraints newConstraints);
540 float clampPageScaleFactorToLimits(float) const;
541 IntSize contentsSize() const; 541 IntSize contentsSize() const;
542 542
543 void updateMainFrameScrollPosition(const DoublePoint& scrollPosition, bool p rogrammaticScroll); 543 void updateMainFrameScrollPosition(const DoublePoint& scrollPosition, bool p rogrammaticScroll);
544 544
545 void performResize(); 545 void performResize();
546 546
547 friend class WebView; // So WebView::Create can call our constructor 547 friend class WebView; // So WebView::Create can call our constructor
548 friend class WTF::RefCounted<WebViewImpl>; 548 friend class WTF::RefCounted<WebViewImpl>;
549 friend void setCurrentInputEventForTest(const WebInputEvent*); 549 friend void setCurrentInputEventForTest(const WebInputEvent*);
550 550
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
765 }; 765 };
766 766
767 DEFINE_TYPE_CASTS(WebViewImpl, WebWidget, widget, widget->isWebView(), widget.is WebView()); 767 DEFINE_TYPE_CASTS(WebViewImpl, WebWidget, widget, widget->isWebView(), widget.is WebView());
768 // We have no ways to check if the specified WebView is an instance of 768 // We have no ways to check if the specified WebView is an instance of
769 // WebViewImpl because WebViewImpl is the only implementation of WebView. 769 // WebViewImpl because WebViewImpl is the only implementation of WebView.
770 DEFINE_TYPE_CASTS(WebViewImpl, WebView, webView, true, true); 770 DEFINE_TYPE_CASTS(WebViewImpl, WebView, webView, true, true);
771 771
772 } // namespace blink 772 } // namespace blink
773 773
774 #endif 774 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698