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

Side by Side Diff: Source/core/frame/PinchViewport.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) 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 99
100 // Let the viewport know that the main frame changed size (either through sc reen 100 // Let the viewport know that the main frame changed size (either through sc reen
101 // rotation on Android or window resize elsewhere). 101 // rotation on Android or window resize elsewhere).
102 void mainFrameDidChangeSize(); 102 void mainFrameDidChangeSize();
103 103
104 // Sets scale and location in one operation, preventing intermediate clampin g. 104 // Sets scale and location in one operation, preventing intermediate clampin g.
105 void setScaleAndLocation(float scale, const FloatPoint& location); 105 void setScaleAndLocation(float scale, const FloatPoint& location);
106 void setScale(float); 106 void setScale(float);
107 float scale() const { return m_scale; } 107 float scale() const { return m_scale; }
108 108
109 // Update scale factor, magnifying or minifying by magnifyDelta, centered ar ound
110 // the point specified by anchor in window coordinates. Returns false if pag e
111 // scale factor is left unchanged.
112 bool magnifyScaleAroundAnchor(float magnifyDelta, const FloatPoint& anchor);
113
109 void registerLayersWithTreeView(blink::WebLayerTreeView*) const; 114 void registerLayersWithTreeView(blink::WebLayerTreeView*) const;
110 void clearLayersForTreeView(blink::WebLayerTreeView*) const; 115 void clearLayersForTreeView(blink::WebLayerTreeView*) const;
111 116
112 // The portion of the unzoomed frame visible in the inner "pinch" viewport, 117 // The portion of the unzoomed frame visible in the inner "pinch" viewport,
113 // in partial CSS pixels. Relative to the main frame. 118 // in partial CSS pixels. Relative to the main frame.
114 FloatRect visibleRect() const; 119 FloatRect visibleRect() const;
115 120
116 // The viewport rect relative to the document origin, in partial CSS pixels. 121 // The viewport rect relative to the document origin, in partial CSS pixels.
117 // FIXME: This should be a DoubleRect since scroll offsets are now doubles. 122 // FIXME: This should be a DoubleRect since scroll offsets are now doubles.
118 FloatRect visibleRectInDocument() const; 123 FloatRect visibleRectInDocument() const;
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 // Offset of the pinch viewport from the main frame's origin, in CSS pixels. 205 // Offset of the pinch viewport from the main frame's origin, in CSS pixels.
201 FloatPoint m_offset; 206 FloatPoint m_offset;
202 float m_scale; 207 float m_scale;
203 IntSize m_size; 208 IntSize m_size;
204 float m_topControlsAdjustment; 209 float m_topControlsAdjustment;
205 }; 210 };
206 211
207 } // namespace blink 212 } // namespace blink
208 213
209 #endif // PinchViewport_h 214 #endif // PinchViewport_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698