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

Side by Side Diff: sky/engine/public/web/WebView.h

Issue 714013002: Remove some more zoom-related code. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: merge to ToT Created 6 years, 1 month 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) 2009, 2010, 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2009, 2010, 2011, 2012 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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 virtual void zoomToFindInPageRect(const WebRect&) = 0; 154 virtual void zoomToFindInPageRect(const WebRect&) = 0;
155 155
156 // Animate a scale into the specified rect where multiple targets were 156 // Animate a scale into the specified rect where multiple targets were
157 // found from previous tap gesture. 157 // found from previous tap gesture.
158 // Returns false if it doesn't do any zooming. 158 // Returns false if it doesn't do any zooming.
159 virtual bool zoomToMultipleTargetsRect(const WebRect&) = 0; 159 virtual bool zoomToMultipleTargetsRect(const WebRect&) = 0;
160 160
161 161
162 // Zoom ---------------------------------------------------------------- 162 // Zoom ----------------------------------------------------------------
163 163
164 // Returns the current zoom level. 0 is "original size", and each increment
165 // above or below represents zooming 20% larger or smaller to default limits
166 // of 300% and 50% of original size, respectively. Only plugins use
167 // non whole-numbers, since they might choose to have specific zoom level so
168 // that fixed-width content is fit-to-page-width, for example.
169 virtual double zoomLevel() = 0;
170
171 // Changes the zoom level to the specified level, clamping at the limits
172 // noted above, and returns the current zoom level after applying the
173 // change.
174 virtual double setZoomLevel(double) = 0;
175
176 // Updates the zoom limits for this view.
177 virtual void zoomLimitsChanged(double minimumZoomLevel,
178 double maximumZoomLevel) = 0;
179
180 // Helper functions to convert between zoom level and zoom factor. zoom
181 // factor is zoom percent / 100, so 300% = 3.0.
182 BLINK_EXPORT static double zoomLevelToZoomFactor(double zoomLevel);
183 BLINK_EXPORT static double zoomFactorToZoomLevel(double factor);
184
185 // Returns the current text zoom factor, where 1.0 is the normal size, > 1.0
186 // is scaled up and < 1.0 is scaled down.
187 virtual float textZoomFactor() = 0;
188
189 // Scales the text in the page by a factor of textZoomFactor.
190 // Note: this has no effect on plugins.
191 virtual float setTextZoomFactor(float) = 0;
192
193 // TODO: Reevaluate if this is needed once all users are converted to using the 164 // TODO: Reevaluate if this is needed once all users are converted to using the
194 // virtual viewport pinch model. 165 // virtual viewport pinch model.
195 // Temporary to keep old style pinch viewport working while we gradually bri ng up 166 // Temporary to keep old style pinch viewport working while we gradually bri ng up
196 // virtual viewport pinch. 167 // virtual viewport pinch.
197 virtual void setMainFrameScrollOffset(const WebPoint& origin) = 0; 168 virtual void setMainFrameScrollOffset(const WebPoint& origin) = 0;
198 169
199 // Reset any saved values for the scroll and scale state. 170 // Reset any saved values for the scroll and scale state.
200 virtual void resetScrollAndScaleState() = 0; 171 virtual void resetScrollAndScaleState() = 0;
201 172
202 // Returns the "preferred" contents size, defined as the preferred minimum w idth of the main document's contents 173 // Returns the "preferred" contents size, defined as the preferred minimum w idth of the main document's contents
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 262
292 // Testing functionality for TestRunner --------------------------------- 263 // Testing functionality for TestRunner ---------------------------------
293 264
294 protected: 265 protected:
295 ~WebView() {} 266 ~WebView() {}
296 }; 267 };
297 268
298 } // namespace blink 269 } // namespace blink
299 270
300 #endif 271 #endif
OLDNEW
« no previous file with comments | « sky/engine/core/rendering/style/StyleVisualData.cpp ('k') | sky/engine/public/web/WebViewClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698