| 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 13 matching lines...) Expand all Loading... |
| 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #ifndef FrameHost_h | 31 #ifndef FrameHost_h |
| 32 #define FrameHost_h | 32 #define FrameHost_h |
| 33 | 33 |
| 34 #include "core/frame/PinchViewport.h" | |
| 35 #include "platform/heap/Handle.h" | 34 #include "platform/heap/Handle.h" |
| 36 #include "wtf/FastAllocBase.h" | 35 #include "wtf/FastAllocBase.h" |
| 37 #include "wtf/Noncopyable.h" | 36 #include "wtf/Noncopyable.h" |
| 38 #include "wtf/OwnPtr.h" | 37 #include "wtf/OwnPtr.h" |
| 39 #include "wtf/PassOwnPtr.h" | 38 #include "wtf/PassOwnPtr.h" |
| 40 | 39 |
| 41 namespace blink { | 40 namespace blink { |
| 42 | 41 |
| 43 class Chrome; | 42 class Chrome; |
| 44 class EventHandlerRegistry; | 43 class EventHandlerRegistry; |
| 45 class Page; | 44 class Page; |
| 46 class PinchViewport; | |
| 47 class Settings; | 45 class Settings; |
| 48 class UseCounter; | 46 class UseCounter; |
| 49 class Visitor; | 47 class Visitor; |
| 50 | 48 |
| 51 // FrameHost is the set of global data shared between multiple frames | 49 // FrameHost is the set of global data shared between multiple frames |
| 52 // and is provided by the embedder to each frame when created. | 50 // and is provided by the embedder to each frame when created. |
| 53 // FrameHost currently corresponds to the Page object in core/page | 51 // FrameHost currently corresponds to the Page object in core/page |
| 54 // however the concept of a Page is moving up out of Blink. | 52 // however the concept of a Page is moving up out of Blink. |
| 55 // In an out-of-process iframe world, a single Page may have | 53 // In an out-of-process iframe world, a single Page may have |
| 56 // multiple frames in different process, thus Page becomes a | 54 // multiple frames in different process, thus Page becomes a |
| (...skipping 10 matching lines...) Expand all Loading... |
| 67 Page& page() const { return *m_page; } | 65 Page& page() const { return *m_page; } |
| 68 Settings& settings() const; | 66 Settings& settings() const; |
| 69 Chrome& chrome() const; | 67 Chrome& chrome() const; |
| 70 UseCounter& useCounter() const; | 68 UseCounter& useCounter() const; |
| 71 | 69 |
| 72 // Corresponds to pixel density of the device where this Page is | 70 // Corresponds to pixel density of the device where this Page is |
| 73 // being displayed. In multi-monitor setups this can vary between pages. | 71 // being displayed. In multi-monitor setups this can vary between pages. |
| 74 // This value does not account for Page zoom, use LocalFrame::devicePixelRat
io instead. | 72 // This value does not account for Page zoom, use LocalFrame::devicePixelRat
io instead. |
| 75 float deviceScaleFactor() const; | 73 float deviceScaleFactor() const; |
| 76 | 74 |
| 77 PinchViewport& pinchViewport() const; | |
| 78 EventHandlerRegistry& eventHandlerRegistry() const; | 75 EventHandlerRegistry& eventHandlerRegistry() const; |
| 79 | 76 |
| 80 void trace(Visitor*); | 77 void trace(Visitor*); |
| 81 | 78 |
| 82 private: | 79 private: |
| 83 explicit FrameHost(Page&); | 80 explicit FrameHost(Page&); |
| 84 | 81 |
| 85 RawPtrWillBeMember<Page> m_page; | 82 RawPtrWillBeMember<Page> m_page; |
| 86 const OwnPtr<PinchViewport> m_pinchViewport; | |
| 87 const OwnPtrWillBeMember<EventHandlerRegistry> m_eventHandlerRegistry; | 83 const OwnPtrWillBeMember<EventHandlerRegistry> m_eventHandlerRegistry; |
| 88 }; | 84 }; |
| 89 | 85 |
| 90 } | 86 } |
| 91 | 87 |
| 92 #endif // FrameHost_h | 88 #endif // FrameHost_h |
| OLD | NEW |