| 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 | 74 |
| 75 // Sets the location of the inner viewport relative to the outer viewport. T
he | 75 // Sets the location of the inner viewport relative to the outer viewport. T
he |
| 76 // coordinates are in partial CSS pixels. | 76 // coordinates are in partial CSS pixels. |
| 77 void setLocation(const FloatPoint&); | 77 void setLocation(const FloatPoint&); |
| 78 | 78 |
| 79 // Sets the size of the inner viewport when unscaled in CSS pixels. | 79 // Sets the size of the inner viewport when unscaled in CSS pixels. |
| 80 // This will be clamped to the size of the outer viewport (the main frame). | 80 // This will be clamped to the size of the outer viewport (the main frame). |
| 81 void setSize(const IntSize&); | 81 void setSize(const IntSize&); |
| 82 IntSize size() const { return m_size; } | 82 IntSize size() const { return m_size; } |
| 83 | 83 |
| 84 // Resets the viewport to initial state. |
| 85 void reset(); |
| 86 |
| 84 // Let the viewport know that the main frame changed size (either through sc
reen | 87 // Let the viewport know that the main frame changed size (either through sc
reen |
| 85 // rotation on Android or window resize elsewhere). | 88 // rotation on Android or window resize elsewhere). |
| 86 void mainFrameDidChangeSize(); | 89 void mainFrameDidChangeSize(); |
| 87 | 90 |
| 88 void setScale(float); | 91 void setScale(float); |
| 89 float scale() const { return m_scale; } | 92 float scale() const { return m_scale; } |
| 90 | 93 |
| 91 void registerLayersWithTreeView(blink::WebLayerTreeView*) const; | 94 void registerLayersWithTreeView(blink::WebLayerTreeView*) const; |
| 92 void clearLayersForTreeView(blink::WebLayerTreeView*) const; | 95 void clearLayersForTreeView(blink::WebLayerTreeView*) const; |
| 93 | 96 |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 | 141 |
| 139 // Offset of the pinch viewport from the main frame's origin, in CSS pixels. | 142 // Offset of the pinch viewport from the main frame's origin, in CSS pixels. |
| 140 FloatPoint m_offset; | 143 FloatPoint m_offset; |
| 141 float m_scale; | 144 float m_scale; |
| 142 IntSize m_size; | 145 IntSize m_size; |
| 143 }; | 146 }; |
| 144 | 147 |
| 145 } // namespace WebCore | 148 } // namespace WebCore |
| 146 | 149 |
| 147 #endif // PinchViewport_h | 150 #endif // PinchViewport_h |
| OLD | NEW |