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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 // Since DummyPageHolder stores empty clients in it, it must outlive the Page, L
ocalFrame, FrameView and any other objects | 61 // Since DummyPageHolder stores empty clients in it, it must outlive the Page, L
ocalFrame, FrameView and any other objects |
62 // created by it. DummyPageHolder's destructor ensures this condition by checkin
g remaining references to the LocalFrame. | 62 // created by it. DummyPageHolder's destructor ensures this condition by checkin
g remaining references to the LocalFrame. |
63 | 63 |
64 class DummyPageHolder { | 64 class DummyPageHolder { |
65 WTF_MAKE_NONCOPYABLE(DummyPageHolder); | 65 WTF_MAKE_NONCOPYABLE(DummyPageHolder); |
66 USING_FAST_MALLOC(DummyPageHolder); | 66 USING_FAST_MALLOC(DummyPageHolder); |
67 public: | 67 public: |
68 static PassOwnPtr<DummyPageHolder> create( | 68 static PassOwnPtr<DummyPageHolder> create( |
69 const IntSize& initialViewSize = IntSize(), | 69 const IntSize& initialViewSize = IntSize(), |
70 Page::PageClients* = 0, | 70 Page::PageClients* = 0, |
71 PassOwnPtrWillBeRawPtr<FrameLoaderClient> = nullptr, | 71 RawPtr<FrameLoaderClient> = nullptr, |
72 FrameSettingOverrideFunction = nullptr); | 72 FrameSettingOverrideFunction = nullptr); |
73 ~DummyPageHolder(); | 73 ~DummyPageHolder(); |
74 | 74 |
75 Page& page() const; | 75 Page& page() const; |
76 LocalFrame& frame() const; | 76 LocalFrame& frame() const; |
77 FrameView& frameView() const; | 77 FrameView& frameView() const; |
78 Document& document() const; | 78 Document& document() const; |
79 | 79 |
80 private: | 80 private: |
81 DummyPageHolder(const IntSize& initialViewSize, Page::PageClients*, PassOwnP
trWillBeRawPtr<FrameLoaderClient>, FrameSettingOverrideFunction settingOverrider
); | 81 DummyPageHolder(const IntSize& initialViewSize, Page::PageClients*, RawPtr<F
rameLoaderClient>, FrameSettingOverrideFunction settingOverrider); |
82 | 82 |
83 OwnPtrWillBePersistent<Page> m_page; | 83 Persistent<Page> m_page; |
84 RefPtrWillBePersistent<LocalFrame> m_frame; | 84 Persistent<LocalFrame> m_frame; |
85 | 85 |
86 OwnPtrWillBePersistent<FrameLoaderClient> m_frameLoaderClient; | 86 Persistent<FrameLoaderClient> m_frameLoaderClient; |
87 }; | 87 }; |
88 | 88 |
89 } // namespace blink | 89 } // namespace blink |
90 | 90 |
91 #endif // DummyPageHolder_h | 91 #endif // DummyPageHolder_h |
OLD | NEW |