Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 around specified anchor. | |
| 110 void setScaleAroundAnchor(float scale, const FloatPoint& anchor); | |
|
bokan
2015/02/03 03:05:16
Could you also add a comment or name anchor so it'
ccameron
2015/02/03 17:03:28
Done.
| |
| 111 | |
| 109 void registerLayersWithTreeView(blink::WebLayerTreeView*) const; | 112 void registerLayersWithTreeView(blink::WebLayerTreeView*) const; |
| 110 void clearLayersForTreeView(blink::WebLayerTreeView*) const; | 113 void clearLayersForTreeView(blink::WebLayerTreeView*) const; |
| 111 | 114 |
| 112 // The portion of the unzoomed frame visible in the inner "pinch" viewport, | 115 // The portion of the unzoomed frame visible in the inner "pinch" viewport, |
| 113 // in partial CSS pixels. Relative to the main frame. | 116 // in partial CSS pixels. Relative to the main frame. |
| 114 FloatRect visibleRect() const; | 117 FloatRect visibleRect() const; |
| 115 | 118 |
| 116 // The viewport rect relative to the document origin, in partial CSS pixels. | 119 // 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. | 120 // FIXME: This should be a DoubleRect since scroll offsets are now doubles. |
| 118 FloatRect visibleRectInDocument() const; | 121 FloatRect visibleRectInDocument() const; |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 199 // Offset of the pinch viewport from the main frame's origin, in CSS pixels. | 202 // Offset of the pinch viewport from the main frame's origin, in CSS pixels. |
| 200 FloatPoint m_offset; | 203 FloatPoint m_offset; |
| 201 float m_scale; | 204 float m_scale; |
| 202 IntSize m_size; | 205 IntSize m_size; |
| 203 float m_topControlsAdjustment; | 206 float m_topControlsAdjustment; |
| 204 }; | 207 }; |
| 205 | 208 |
| 206 } // namespace blink | 209 } // namespace blink |
| 207 | 210 |
| 208 #endif // PinchViewport_h | 211 #endif // PinchViewport_h |
| OLD | NEW |