Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(80)

Side by Side Diff: third_party/WebKit/Source/core/testing/DummyPageHolder.h

Issue 2715173002: Final rename from FrameLoaderClient to LocalFrameClient: (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 DummyPageHolder_h 31 #ifndef DummyPageHolder_h
32 #define DummyPageHolder_h 32 #define DummyPageHolder_h
33 33
34 #include "core/loader/FrameLoaderClient.h" 34 #include <memory>
35 #include "core/frame/LocalFrameClient.h"
35 #include "core/page/Page.h" 36 #include "core/page/Page.h"
36 #include "platform/geometry/IntSize.h" 37 #include "platform/geometry/IntSize.h"
37 #include "platform/heap/Handle.h" 38 #include "platform/heap/Handle.h"
38 #include "wtf/Allocator.h" 39 #include "wtf/Allocator.h"
39 #include "wtf/Noncopyable.h" 40 #include "wtf/Noncopyable.h"
40 #include <memory>
41 41
42 namespace blink { 42 namespace blink {
43 43
44 class Document; 44 class Document;
45 class LocalFrame; 45 class LocalFrame;
46 class FrameView; 46 class FrameView;
47 class InterfaceProvider; 47 class InterfaceProvider;
48 class IntSize; 48 class IntSize;
49 class Settings; 49 class Settings;
50 50
(...skipping 12 matching lines...) Expand all
63 // LocalFrame. 63 // LocalFrame.
64 64
65 class DummyPageHolder { 65 class DummyPageHolder {
66 WTF_MAKE_NONCOPYABLE(DummyPageHolder); 66 WTF_MAKE_NONCOPYABLE(DummyPageHolder);
67 USING_FAST_MALLOC(DummyPageHolder); 67 USING_FAST_MALLOC(DummyPageHolder);
68 68
69 public: 69 public:
70 static std::unique_ptr<DummyPageHolder> create( 70 static std::unique_ptr<DummyPageHolder> create(
71 const IntSize& initialViewSize = IntSize(), 71 const IntSize& initialViewSize = IntSize(),
72 Page::PageClients* = 0, 72 Page::PageClients* = 0,
73 FrameLoaderClient* = nullptr, 73 LocalFrameClient* = nullptr,
74 FrameSettingOverrideFunction = nullptr, 74 FrameSettingOverrideFunction = nullptr,
75 InterfaceProvider* = nullptr); 75 InterfaceProvider* = nullptr);
76 ~DummyPageHolder(); 76 ~DummyPageHolder();
77 77
78 Page& page() const; 78 Page& page() const;
79 LocalFrame& frame() const; 79 LocalFrame& frame() const;
80 FrameView& frameView() const; 80 FrameView& frameView() const;
81 Document& document() const; 81 Document& document() const;
82 82
83 private: 83 private:
84 DummyPageHolder(const IntSize& initialViewSize, 84 DummyPageHolder(const IntSize& initialViewSize,
85 Page::PageClients*, 85 Page::PageClients*,
86 FrameLoaderClient*, 86 LocalFrameClient*,
87 FrameSettingOverrideFunction settingOverrider, 87 FrameSettingOverrideFunction settingOverrider,
88 InterfaceProvider* = nullptr); 88 InterfaceProvider* = nullptr);
89 89
90 Persistent<Page> m_page; 90 Persistent<Page> m_page;
91 91
92 // The LocalFrame is accessed from worker threads by unit tests 92 // The LocalFrame is accessed from worker threads by unit tests
93 // (WorkerThreadableLoaderTest), hence we need to allow cross-thread 93 // (WorkerThreadableLoaderTest), hence we need to allow cross-thread
94 // usage of |m_frame|. 94 // usage of |m_frame|.
95 // 95 //
96 // TODO: rework the tests to not require cross-thread access. 96 // TODO: rework the tests to not require cross-thread access.
97 CrossThreadPersistent<LocalFrame> m_frame; 97 CrossThreadPersistent<LocalFrame> m_frame;
98 98
99 Persistent<FrameLoaderClient> m_frameLoaderClient; 99 Persistent<LocalFrameClient> m_localFrameClient;
100 }; 100 };
101 101
102 } // namespace blink 102 } // namespace blink
103 103
104 #endif // DummyPageHolder_h 104 #endif // DummyPageHolder_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/VideoPainterTest.cpp ('k') | third_party/WebKit/Source/core/testing/DummyPageHolder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698