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

Side by Side Diff: third_party/WebKit/Source/core/frame/VisualViewport.h

Issue 2901203002: Rename VisualViewport properties to match updated spec (Closed)
Patch Set: Make methods const Created 3 years, 6 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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 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 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 GraphicsLayer* LayerForHorizontalScrollbar() const override; 210 GraphicsLayer* LayerForHorizontalScrollbar() const override;
211 GraphicsLayer* LayerForVerticalScrollbar() const override; 211 GraphicsLayer* LayerForVerticalScrollbar() const override;
212 bool ScheduleAnimation() override; 212 bool ScheduleAnimation() override;
213 CompositorAnimationHost* GetCompositorAnimationHost() const override; 213 CompositorAnimationHost* GetCompositorAnimationHost() const override;
214 CompositorAnimationTimeline* GetCompositorAnimationTimeline() const override; 214 CompositorAnimationTimeline* GetCompositorAnimationTimeline() const override;
215 IntRect VisibleContentRect( 215 IntRect VisibleContentRect(
216 IncludeScrollbarsInRect = kExcludeScrollbars) const override; 216 IncludeScrollbarsInRect = kExcludeScrollbars) const override;
217 RefPtr<WebTaskRunner> GetTimerTaskRunner() const final; 217 RefPtr<WebTaskRunner> GetTimerTaskRunner() const final;
218 218
219 // Visual Viewport API implementation. 219 // Visual Viewport API implementation.
220 double ScrollLeft(); 220 double OffsetLeft() const;
221 double ScrollTop(); 221 double OffsetTop() const;
222 double ClientWidth(); 222 double Width() const;
223 double ClientHeight(); 223 double Height() const;
224 double PageScale(); 224 double ScaleForVisualViewport() const;
225 225
226 // Used for gathering data on user pinch-zoom statistics. 226 // Used for gathering data on user pinch-zoom statistics.
227 void UserDidChangeScale(); 227 void UserDidChangeScale();
228 void SendUMAMetrics(); 228 void SendUMAMetrics();
229 void StartTrackingPinchStats(); 229 void StartTrackingPinchStats();
230 230
231 // Heuristic-based function for determining if we should disable workarounds 231 // Heuristic-based function for determining if we should disable workarounds
232 // for viewing websites that are not optimized for mobile devices. 232 // for viewing websites that are not optimized for mobile devices.
233 bool ShouldDisableDesktopWorkarounds() const; 233 bool ShouldDisableDesktopWorkarounds() const;
234 234
235 private: 235 private:
236 explicit VisualViewport(Page&); 236 explicit VisualViewport(Page&);
237 237
238 bool DidSetScaleOrLocation(float scale, const FloatPoint& location); 238 bool DidSetScaleOrLocation(float scale, const FloatPoint& location);
239 239
240 bool VisualViewportSuppliesScrollbars() const; 240 bool VisualViewportSuppliesScrollbars() const;
241 241
242 void UpdateStyleAndLayoutIgnorePendingStylesheets(); 242 void UpdateStyleAndLayoutIgnorePendingStylesheets() const;
243 243
244 void EnqueueScrollEvent(); 244 void EnqueueScrollEvent();
245 void EnqueueResizeEvent(); 245 void EnqueueResizeEvent();
246 246
247 // GraphicsLayerClient implementation. 247 // GraphicsLayerClient implementation.
248 bool NeedsRepaint(const GraphicsLayer&) const { 248 bool NeedsRepaint(const GraphicsLayer&) const {
249 NOTREACHED(); 249 NOTREACHED();
250 return true; 250 return true;
251 } 251 }
252 IntRect ComputeInterestRect(const GraphicsLayer*, const IntRect&) const; 252 IntRect ComputeInterestRect(const GraphicsLayer*, const IntRect&) const;
(...skipping 30 matching lines...) Expand all
283 float scale_; 283 float scale_;
284 IntSize size_; 284 IntSize size_;
285 float browser_controls_adjustment_; 285 float browser_controls_adjustment_;
286 float max_page_scale_; 286 float max_page_scale_;
287 bool track_pinch_zoom_stats_for_page_; 287 bool track_pinch_zoom_stats_for_page_;
288 }; 288 };
289 289
290 } // namespace blink 290 } // namespace blink
291 291
292 #endif // VisualViewport_h 292 #endif // VisualViewport_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/UseCounter.h ('k') | third_party/WebKit/Source/core/frame/VisualViewport.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698