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