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

Side by Side Diff: third_party/WebKit/Source/web/WebSharedWorkerImpl.h

Issue 2050123002: Remove OwnPtr from Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments from Kent; merge. 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) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 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 24 matching lines...) Expand all
35 35
36 #include "core/dom/ExecutionContext.h" 36 #include "core/dom/ExecutionContext.h"
37 #include "core/workers/WorkerLoaderProxy.h" 37 #include "core/workers/WorkerLoaderProxy.h"
38 #include "core/workers/WorkerReportingProxy.h" 38 #include "core/workers/WorkerReportingProxy.h"
39 #include "core/workers/WorkerThread.h" 39 #include "core/workers/WorkerThread.h"
40 #include "public/platform/WebAddressSpace.h" 40 #include "public/platform/WebAddressSpace.h"
41 #include "public/web/WebContentSecurityPolicy.h" 41 #include "public/web/WebContentSecurityPolicy.h"
42 #include "public/web/WebDevToolsAgentClient.h" 42 #include "public/web/WebDevToolsAgentClient.h"
43 #include "public/web/WebFrameClient.h" 43 #include "public/web/WebFrameClient.h"
44 #include "public/web/WebSharedWorkerClient.h" 44 #include "public/web/WebSharedWorkerClient.h"
45 #include "wtf/PassOwnPtr.h"
46 #include "wtf/RefPtr.h" 45 #include "wtf/RefPtr.h"
46 #include <memory>
47 47
48 namespace blink { 48 namespace blink {
49 49
50 class ConsoleMessage; 50 class ConsoleMessage;
51 class WebApplicationCacheHost; 51 class WebApplicationCacheHost;
52 class WebApplicationCacheHostClient; 52 class WebApplicationCacheHostClient;
53 class WebLocalFrameImpl; 53 class WebLocalFrameImpl;
54 class WebServiceWorkerNetworkProvider; 54 class WebServiceWorkerNetworkProvider;
55 class WebSharedWorkerClient; 55 class WebSharedWorkerClient;
56 class WebString; 56 class WebString;
(...skipping 11 matching lines...) Expand all
68 class WebSharedWorkerImpl final 68 class WebSharedWorkerImpl final
69 : public WorkerReportingProxy 69 : public WorkerReportingProxy
70 , public WebFrameClient 70 , public WebFrameClient
71 , public WebSharedWorker 71 , public WebSharedWorker
72 , public WebDevToolsAgentClient 72 , public WebDevToolsAgentClient
73 , private WorkerLoaderProxyProvider { 73 , private WorkerLoaderProxyProvider {
74 public: 74 public:
75 explicit WebSharedWorkerImpl(WebSharedWorkerClient*); 75 explicit WebSharedWorkerImpl(WebSharedWorkerClient*);
76 76
77 // WorkerReportingProxy methods: 77 // WorkerReportingProxy methods:
78 void reportException(const WTF::String&, PassOwnPtr<SourceLocation>) overrid e; 78 void reportException(const WTF::String&, std::unique_ptr<SourceLocation>) ov erride;
79 void reportConsoleMessage(ConsoleMessage*) override; 79 void reportConsoleMessage(ConsoleMessage*) override;
80 void postMessageToPageInspector(const WTF::String&) override; 80 void postMessageToPageInspector(const WTF::String&) override;
81 void postWorkerConsoleAgentEnabled() override { } 81 void postWorkerConsoleAgentEnabled() override { }
82 void didEvaluateWorkerScript(bool success) override { } 82 void didEvaluateWorkerScript(bool success) override { }
83 void workerGlobalScopeStarted(WorkerGlobalScope*) override; 83 void workerGlobalScopeStarted(WorkerGlobalScope*) override;
84 void workerGlobalScopeClosed() override; 84 void workerGlobalScopeClosed() override;
85 void workerThreadTerminated() override; 85 void workerThreadTerminated() override;
86 void willDestroyWorkerGlobalScope() override { } 86 void willDestroyWorkerGlobalScope() override { }
87 87
88 // WebFrameClient methods to support resource loading thru the 'shadow page' . 88 // WebFrameClient methods to support resource loading thru the 'shadow page' .
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 void postTaskToLoader(std::unique_ptr<ExecutionContextTask>) override; 133 void postTaskToLoader(std::unique_ptr<ExecutionContextTask>) override;
134 bool postTaskToWorkerGlobalScope(std::unique_ptr<ExecutionContextTask>) over ride; 134 bool postTaskToWorkerGlobalScope(std::unique_ptr<ExecutionContextTask>) over ride;
135 135
136 // 'shadow page' - created to proxy loading requests from the worker. 136 // 'shadow page' - created to proxy loading requests from the worker.
137 Persistent<ExecutionContext> m_loadingDocument; 137 Persistent<ExecutionContext> m_loadingDocument;
138 WebView* m_webView; 138 WebView* m_webView;
139 Persistent<WebLocalFrameImpl> m_mainFrame; 139 Persistent<WebLocalFrameImpl> m_mainFrame;
140 bool m_askedToTerminate; 140 bool m_askedToTerminate;
141 141
142 // This one is bound to and used only on the main thread. 142 // This one is bound to and used only on the main thread.
143 OwnPtr<WebServiceWorkerNetworkProvider> m_networkProvider; 143 std::unique_ptr<WebServiceWorkerNetworkProvider> m_networkProvider;
144 144
145 Persistent<WorkerInspectorProxy> m_workerInspectorProxy; 145 Persistent<WorkerInspectorProxy> m_workerInspectorProxy;
146 146
147 OwnPtr<WorkerThread> m_workerThread; 147 std::unique_ptr<WorkerThread> m_workerThread;
148 148
149 WebSharedWorkerClient* m_client; 149 WebSharedWorkerClient* m_client;
150 150
151 bool m_pauseWorkerContextOnStart; 151 bool m_pauseWorkerContextOnStart;
152 bool m_isPausedOnStart; 152 bool m_isPausedOnStart;
153 153
154 // Kept around only while main script loading is ongoing. 154 // Kept around only while main script loading is ongoing.
155 RefPtr<WorkerScriptLoader> m_mainScriptLoader; 155 RefPtr<WorkerScriptLoader> m_mainScriptLoader;
156 156
157 RefPtr<WorkerLoaderProxy> m_loaderProxy; 157 RefPtr<WorkerLoaderProxy> m_loaderProxy;
158 158
159 WebURL m_url; 159 WebURL m_url;
160 WebString m_name; 160 WebString m_name;
161 WebAddressSpace m_creationAddressSpace; 161 WebAddressSpace m_creationAddressSpace;
162 }; 162 };
163 163
164 } // namespace blink 164 } // namespace blink
165 165
166 #endif // WebSharedWorkerImpl_h 166 #endif // WebSharedWorkerImpl_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698