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

Side by Side Diff: third_party/WebKit/Source/platform/testing/TestingPlatformSupport.h

Issue 2050123002: Remove OwnPtr from Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: First attempt to land. Created 4 years, 6 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) 2014 Google Inc. All rights reserved. 2 * Copyright (C) 2014 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 19 matching lines...) Expand all
30 30
31 #ifndef TestingPlatformSupport_h 31 #ifndef TestingPlatformSupport_h
32 #define TestingPlatformSupport_h 32 #define TestingPlatformSupport_h
33 33
34 #include "platform/PlatformExport.h" 34 #include "platform/PlatformExport.h"
35 #include "public/platform/Platform.h" 35 #include "public/platform/Platform.h"
36 #include "public/platform/WebCompositorSupport.h" 36 #include "public/platform/WebCompositorSupport.h"
37 #include "public/platform/WebScheduler.h" 37 #include "public/platform/WebScheduler.h"
38 #include "public/platform/WebThread.h" 38 #include "public/platform/WebThread.h"
39 #include "wtf/Vector.h" 39 #include "wtf/Vector.h"
40 #include <memory>
40 41
41 namespace blink { 42 namespace blink {
42 43
43 class TestingPlatformMockWebTaskRunner; 44 class TestingPlatformMockWebTaskRunner;
44 class TestingPlatformMockWebThread; 45 class TestingPlatformMockWebThread;
45 class WebCompositorSupport; 46 class WebCompositorSupport;
46 class WebThread; 47 class WebThread;
47 48
48 class TestingCompositorSupport : public WebCompositorSupport { 49 class TestingCompositorSupport : public WebCompositorSupport {
49 }; 50 };
(...skipping 17 matching lines...) Expand all
67 void postNonNestableIdleTask(const WebTraceLocation&, WebThread::IdleTask*) override { } 68 void postNonNestableIdleTask(const WebTraceLocation&, WebThread::IdleTask*) override { }
68 void postIdleTaskAfterWakeup(const WebTraceLocation&, WebThread::IdleTask*) override { } 69 void postIdleTaskAfterWakeup(const WebTraceLocation&, WebThread::IdleTask*) override { }
69 std::unique_ptr<WebViewScheduler> createWebViewScheduler(blink::WebView*) ov erride { return nullptr; } 70 std::unique_ptr<WebViewScheduler> createWebViewScheduler(blink::WebView*) ov erride { return nullptr; }
70 void suspendTimerQueue() override { } 71 void suspendTimerQueue() override { }
71 void resumeTimerQueue() override { } 72 void resumeTimerQueue() override { }
72 void addPendingNavigation(WebScheduler::NavigatingFrameType) override { } 73 void addPendingNavigation(WebScheduler::NavigatingFrameType) override { }
73 void removePendingNavigation(WebScheduler::NavigatingFrameType) override { } 74 void removePendingNavigation(WebScheduler::NavigatingFrameType) override { }
74 void onNavigationStarted() override { } 75 void onNavigationStarted() override { }
75 76
76 private: 77 private:
77 WTF::Deque<OwnPtr<WebTaskRunner::Task>> m_tasks; 78 WTF::Deque<std::unique_ptr<WebTaskRunner::Task>> m_tasks;
78 OwnPtr<TestingPlatformMockWebTaskRunner> m_mockWebTaskRunner; 79 std::unique_ptr<TestingPlatformMockWebTaskRunner> m_mockWebTaskRunner;
79 }; 80 };
80 81
81 class TestingPlatformSupport : public Platform { 82 class TestingPlatformSupport : public Platform {
82 WTF_MAKE_NONCOPYABLE(TestingPlatformSupport); 83 WTF_MAKE_NONCOPYABLE(TestingPlatformSupport);
83 public: 84 public:
84 struct Config { 85 struct Config {
85 WebCompositorSupport* compositorSupport = nullptr; 86 WebCompositorSupport* compositorSupport = nullptr;
86 }; 87 };
87 88
88 TestingPlatformSupport(); 89 TestingPlatformSupport();
(...skipping 16 matching lines...) Expand all
105 public: 106 public:
106 TestingPlatformSupportWithMockScheduler(); 107 TestingPlatformSupportWithMockScheduler();
107 explicit TestingPlatformSupportWithMockScheduler(const Config&); 108 explicit TestingPlatformSupportWithMockScheduler(const Config&);
108 ~TestingPlatformSupportWithMockScheduler() override; 109 ~TestingPlatformSupportWithMockScheduler() override;
109 110
110 // Platform: 111 // Platform:
111 WebThread* currentThread() override; 112 WebThread* currentThread() override;
112 TestingPlatformMockScheduler* mockWebScheduler(); 113 TestingPlatformMockScheduler* mockWebScheduler();
113 114
114 protected: 115 protected:
115 OwnPtr<TestingPlatformMockWebThread> m_mockWebThread; 116 std::unique_ptr<TestingPlatformMockWebThread> m_mockWebThread;
116 }; 117 };
117 118
118 } // namespace blink 119 } // namespace blink
119 120
120 #endif // TestingPlatformSupport_h 121 #endif // TestingPlatformSupport_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698