| 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 23 matching lines...) Expand all Loading... |
| 34 #include "core/CoreExport.h" | 34 #include "core/CoreExport.h" |
| 35 #include "platform/heap/Handle.h" | 35 #include "platform/heap/Handle.h" |
| 36 #include "wtf/Allocator.h" | 36 #include "wtf/Allocator.h" |
| 37 #include "wtf/Noncopyable.h" | 37 #include "wtf/Noncopyable.h" |
| 38 #include "wtf/text/AtomicString.h" | 38 #include "wtf/text/AtomicString.h" |
| 39 #include <memory> | 39 #include <memory> |
| 40 | 40 |
| 41 namespace blink { | 41 namespace blink { |
| 42 | 42 |
| 43 class BrowserControls; | 43 class BrowserControls; |
| 44 class OverscrollController; | |
| 45 class Page; | 44 class Page; |
| 46 | 45 |
| 47 // FrameHost is the set of global data shared between multiple frames | 46 // FrameHost is the set of global data shared between multiple frames |
| 48 // and is provided by the embedder to each frame when created. | 47 // and is provided by the embedder to each frame when created. |
| 49 // FrameHost currently corresponds to the Page object in core/page | 48 // FrameHost currently corresponds to the Page object in core/page |
| 50 // however the concept of a Page is moving up out of Blink. | 49 // however the concept of a Page is moving up out of Blink. |
| 51 // In an out-of-process iframe world, a single Page may have | 50 // In an out-of-process iframe world, a single Page may have |
| 52 // multiple frames in different process, thus Page becomes a | 51 // multiple frames in different process, thus Page becomes a |
| 53 // browser-level concept and Blink core/ only knows about its LocalFrame (and | 52 // browser-level concept and Blink core/ only knows about its LocalFrame (and |
| 54 // FrameHost). Separating Page from the rest of core/ through this indirection | 53 // FrameHost). Separating Page from the rest of core/ through this indirection |
| 55 // allows us to slowly refactor Page without breaking the rest of core. | 54 // allows us to slowly refactor Page without breaking the rest of core. |
| 56 // TODO(sashab): Merge FrameHost back into Page. crbug.com/688614 | 55 // TODO(sashab): Merge FrameHost back into Page. crbug.com/688614 |
| 57 class CORE_EXPORT FrameHost final | 56 class CORE_EXPORT FrameHost final |
| 58 : public GarbageCollectedFinalized<FrameHost> { | 57 : public GarbageCollectedFinalized<FrameHost> { |
| 59 WTF_MAKE_NONCOPYABLE(FrameHost); | 58 WTF_MAKE_NONCOPYABLE(FrameHost); |
| 60 | 59 |
| 61 public: | 60 public: |
| 62 static FrameHost* create(Page&); | 61 static FrameHost* create(Page&); |
| 63 ~FrameHost(); | 62 ~FrameHost(); |
| 64 | 63 |
| 65 Page& page(); | 64 Page& page(); |
| 66 const Page& page() const; | 65 const Page& page() const; |
| 67 | 66 |
| 68 BrowserControls& browserControls(); | 67 BrowserControls& browserControls(); |
| 69 const BrowserControls& browserControls() const; | 68 const BrowserControls& browserControls() const; |
| 70 | 69 |
| 71 OverscrollController& overscrollController(); | |
| 72 const OverscrollController& overscrollController() const; | |
| 73 | |
| 74 DECLARE_TRACE(); | 70 DECLARE_TRACE(); |
| 75 | 71 |
| 76 void incrementSubframeCount(); | 72 void incrementSubframeCount(); |
| 77 void decrementSubframeCount(); | 73 void decrementSubframeCount(); |
| 78 int subframeCount() const; | 74 int subframeCount() const; |
| 79 | 75 |
| 80 private: | 76 private: |
| 81 explicit FrameHost(Page&); | 77 explicit FrameHost(Page&); |
| 82 | 78 |
| 83 const Member<Page> m_page; | 79 const Member<Page> m_page; |
| 84 }; | 80 }; |
| 85 | 81 |
| 86 } // namespace blink | 82 } // namespace blink |
| 87 | 83 |
| 88 #endif // FrameHost_h | 84 #endif // FrameHost_h |
| OLD | NEW |