| 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 27 matching lines...) Expand all Loading... |
| 38 #include "platform/heap/Handle.h" | 38 #include "platform/heap/Handle.h" |
| 39 #include "wtf/Allocator.h" | 39 #include "wtf/Allocator.h" |
| 40 #include "wtf/Noncopyable.h" | 40 #include "wtf/Noncopyable.h" |
| 41 #include "wtf/OwnPtr.h" | 41 #include "wtf/OwnPtr.h" |
| 42 #include "wtf/PassOwnPtr.h" | 42 #include "wtf/PassOwnPtr.h" |
| 43 | 43 |
| 44 namespace blink { | 44 namespace blink { |
| 45 | 45 |
| 46 class ChromeClient; | 46 class ChromeClient; |
| 47 class ConsoleMessageStorage; | 47 class ConsoleMessageStorage; |
| 48 class DeprecationHelper; |
| 48 class EventHandlerRegistry; | 49 class EventHandlerRegistry; |
| 49 class Page; | 50 class Page; |
| 50 class PageScaleConstraintsSet; | 51 class PageScaleConstraintsSet; |
| 51 class Settings; | 52 class Settings; |
| 52 class UseCounter; | 53 class UseCounter; |
| 53 class Visitor; | 54 class Visitor; |
| 54 | 55 |
| 55 // FrameHost is the set of global data shared between multiple frames | 56 // FrameHost is the set of global data shared between multiple frames |
| 56 // and is provided by the embedder to each frame when created. | 57 // and is provided by the embedder to each frame when created. |
| 57 // FrameHost currently corresponds to the Page object in core/page | 58 // FrameHost currently corresponds to the Page object in core/page |
| 58 // however the concept of a Page is moving up out of Blink. | 59 // however the concept of a Page is moving up out of Blink. |
| 59 // In an out-of-process iframe world, a single Page may have | 60 // In an out-of-process iframe world, a single Page may have |
| 60 // multiple frames in different process, thus Page becomes a | 61 // multiple frames in different process, thus Page becomes a |
| 61 // browser-level concept and Blink core/ only knows about its LocalFrame (and Fr
ameHost). | 62 // browser-level concept and Blink core/ only knows about its LocalFrame (and Fr
ameHost). |
| 62 // Separating Page from the rest of core/ through this indirection | 63 // Separating Page from the rest of core/ through this indirection |
| 63 // allows us to slowly refactor Page without breaking the rest of core. | 64 // allows us to slowly refactor Page without breaking the rest of core. |
| 64 class CORE_EXPORT FrameHost final : public NoBaseWillBeGarbageCollectedFinalized
<FrameHost> { | 65 class CORE_EXPORT FrameHost final : public NoBaseWillBeGarbageCollectedFinalized
<FrameHost> { |
| 65 WTF_MAKE_NONCOPYABLE(FrameHost); USING_FAST_MALLOC_WILL_BE_REMOVED(FrameHost
); | 66 WTF_MAKE_NONCOPYABLE(FrameHost); USING_FAST_MALLOC_WILL_BE_REMOVED(FrameHost
); |
| 66 public: | 67 public: |
| 67 static PassOwnPtrWillBeRawPtr<FrameHost> create(Page&); | 68 static PassOwnPtrWillBeRawPtr<FrameHost> create(Page&); |
| 68 ~FrameHost(); | 69 ~FrameHost(); |
| 69 | 70 |
| 70 // Careful: This function will eventually be removed. | 71 // Careful: This function will eventually be removed. |
| 71 Page& page() const { return *m_page; } | 72 Page& page() const { return *m_page; } |
| 72 Settings& settings() const; | 73 Settings& settings() const; |
| 73 ChromeClient& chromeClient() const; | 74 ChromeClient& chromeClient() const; |
| 74 UseCounter& useCounter() const; | 75 UseCounter& useCounter() const; |
| 76 DeprecationHelper& deprecationHelper() const; |
| 75 | 77 |
| 76 // Corresponds to pixel density of the device where this Page is | 78 // Corresponds to pixel density of the device where this Page is |
| 77 // being displayed. In multi-monitor setups this can vary between pages. | 79 // being displayed. In multi-monitor setups this can vary between pages. |
| 78 // This value does not account for Page zoom, use LocalFrame::devicePixelRat
io instead. | 80 // This value does not account for Page zoom, use LocalFrame::devicePixelRat
io instead. |
| 79 float deviceScaleFactor() const; | 81 float deviceScaleFactor() const; |
| 80 | 82 |
| 81 TopControls& topControls() const; | 83 TopControls& topControls() const; |
| 82 VisualViewport& visualViewport() const; | 84 VisualViewport& visualViewport() const; |
| 83 PageScaleConstraintsSet& pageScaleConstraintsSet() const; | 85 PageScaleConstraintsSet& pageScaleConstraintsSet() const; |
| 84 EventHandlerRegistry& eventHandlerRegistry() const; | 86 EventHandlerRegistry& eventHandlerRegistry() const; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 112 const OwnPtrWillBeMember<EventHandlerRegistry> m_eventHandlerRegistry; | 114 const OwnPtrWillBeMember<EventHandlerRegistry> m_eventHandlerRegistry; |
| 113 const OwnPtrWillBeMember<ConsoleMessageStorage> m_consoleMessageStorage; | 115 const OwnPtrWillBeMember<ConsoleMessageStorage> m_consoleMessageStorage; |
| 114 | 116 |
| 115 AtomicString m_overrideEncoding; | 117 AtomicString m_overrideEncoding; |
| 116 int m_subframeCount; | 118 int m_subframeCount; |
| 117 }; | 119 }; |
| 118 | 120 |
| 119 } | 121 } |
| 120 | 122 |
| 121 #endif // FrameHost_h | 123 #endif // FrameHost_h |
| OLD | NEW |