OLD | NEW |
---|---|
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 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
198 // of 300% and 50% of original size, respectively. Only plugins use | 198 // of 300% and 50% of original size, respectively. Only plugins use |
199 // non whole-numbers, since they might choose to have specific zoom level so | 199 // non whole-numbers, since they might choose to have specific zoom level so |
200 // that fixed-width content is fit-to-page-width, for example. | 200 // that fixed-width content is fit-to-page-width, for example. |
201 virtual double zoomLevel() = 0; | 201 virtual double zoomLevel() = 0; |
202 | 202 |
203 // Changes the zoom level to the specified level, clamping at the limits | 203 // Changes the zoom level to the specified level, clamping at the limits |
204 // noted above, and returns the current zoom level after applying the | 204 // noted above, and returns the current zoom level after applying the |
205 // change. | 205 // change. |
206 virtual double setZoomLevel(double) = 0; | 206 virtual double setZoomLevel(double) = 0; |
207 | 207 |
208 virtual double setZoomLevelForFrame(WebLocalFrame*, double zoomLevel) = 0; | |
alexmos
2016/04/05 18:00:54
nit: comment
wjmaclean
2016/04/05 20:22:00
Done.
| |
209 | |
208 // Updates the zoom limits for this view. | 210 // Updates the zoom limits for this view. |
209 virtual void zoomLimitsChanged(double minimumZoomLevel, | 211 virtual void zoomLimitsChanged(double minimumZoomLevel, |
210 double maximumZoomLevel) = 0; | 212 double maximumZoomLevel) = 0; |
211 | 213 |
212 // Helper functions to convert between zoom level and zoom factor. zoom | 214 // Helper functions to convert between zoom level and zoom factor. zoom |
213 // factor is zoom percent / 100, so 300% = 3.0. | 215 // factor is zoom percent / 100, so 300% = 3.0. |
214 BLINK_EXPORT static double zoomLevelToZoomFactor(double zoomLevel); | 216 BLINK_EXPORT static double zoomLevelToZoomFactor(double zoomLevel); |
215 BLINK_EXPORT static double zoomFactorToZoomLevel(double factor); | 217 BLINK_EXPORT static double zoomFactorToZoomLevel(double factor); |
216 | 218 |
217 // Returns the current text zoom factor, where 1.0 is the normal size, > 1.0 | 219 // Returns the current text zoom factor, where 1.0 is the normal size, > 1.0 |
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
480 // context's ability to deal with that failure gracefully can be tested. | 482 // context's ability to deal with that failure gracefully can be tested. |
481 virtual void forceNextDrawingBufferCreationToFail() = 0; | 483 virtual void forceNextDrawingBufferCreationToFail() = 0; |
482 | 484 |
483 protected: | 485 protected: |
484 ~WebView() {} | 486 ~WebView() {} |
485 }; | 487 }; |
486 | 488 |
487 } // namespace blink | 489 } // namespace blink |
488 | 490 |
489 #endif | 491 #endif |
OLD | NEW |