| 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 18 matching lines...) Expand all Loading... |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #ifndef PageScaleConstraintsSet_h | 31 #ifndef PageScaleConstraintsSet_h |
| 32 #define PageScaleConstraintsSet_h | 32 #define PageScaleConstraintsSet_h |
| 33 | 33 |
| 34 #include "core/CoreExport.h" | 34 #include "core/CoreExport.h" |
| 35 #include "core/dom/ViewportDescription.h" | 35 #include "core/dom/ViewportDescription.h" |
| 36 #include "core/frame/PageScaleConstraints.h" | 36 #include "core/frame/PageScaleConstraints.h" |
| 37 #include "platform/Length.h" | 37 #include "platform/Length.h" |
| 38 #include "platform/geometry/IntSize.h" | 38 #include "platform/geometry/IntSize.h" |
| 39 #include "wtf/FastAllocBase.h" |
| 39 #include "wtf/PassOwnPtr.h" | 40 #include "wtf/PassOwnPtr.h" |
| 40 | 41 |
| 41 namespace blink { | 42 namespace blink { |
| 42 | 43 |
| 43 // This class harmonizes the viewport (particularly page scale) constraints from | 44 // This class harmonizes the viewport (particularly page scale) constraints from |
| 44 // the meta viewport tag and other sources. | 45 // the meta viewport tag and other sources. |
| 45 class CORE_EXPORT PageScaleConstraintsSet { | 46 class CORE_EXPORT PageScaleConstraintsSet { |
| 47 WTF_MAKE_FAST_ALLOCATED(PageScaleConstraintsSet); |
| 46 public: | 48 public: |
| 47 static PassOwnPtr<PageScaleConstraintsSet> create() | 49 static PassOwnPtr<PageScaleConstraintsSet> create() |
| 48 { | 50 { |
| 49 return adoptPtr(new PageScaleConstraintsSet); | 51 return adoptPtr(new PageScaleConstraintsSet); |
| 50 } | 52 } |
| 51 | 53 |
| 52 void setDefaultConstraints(const PageScaleConstraints&); | 54 void setDefaultConstraints(const PageScaleConstraints&); |
| 53 const PageScaleConstraints& defaultConstraints() const; | 55 const PageScaleConstraints& defaultConstraints() const; |
| 54 | 56 |
| 55 // Settings defined in the website's viewport tag, if viewport tag support | 57 // Settings defined in the website's viewport tag, if viewport tag support |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 int m_lastContentsWidth; | 105 int m_lastContentsWidth; |
| 104 IntSize m_viewSize; | 106 IntSize m_viewSize; |
| 105 | 107 |
| 106 bool m_needsReset; | 108 bool m_needsReset; |
| 107 bool m_constraintsDirty; | 109 bool m_constraintsDirty; |
| 108 }; | 110 }; |
| 109 | 111 |
| 110 } // namespace blink | 112 } // namespace blink |
| 111 | 113 |
| 112 #endif // PageScaleConstraintsSet_h | 114 #endif // PageScaleConstraintsSet_h |
| OLD | NEW |