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

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: 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) 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 void postTaskToLoader(std::unique_ptr<ExecutionContextTask>) override; 134 void postTaskToLoader(std::unique_ptr<ExecutionContextTask>) override;
135 bool postTaskToWorkerGlobalScope(std::unique_ptr<ExecutionContextTask>) over ride; 135 bool postTaskToWorkerGlobalScope(std::unique_ptr<ExecutionContextTask>) over ride;
136 136
137 // 'shadow page' - created to proxy loading requests from the worker. 137 // 'shadow page' - created to proxy loading requests from the worker.
138 Persistent<ExecutionContext> m_loadingDocument; 138 Persistent<ExecutionContext> m_loadingDocument;
139 WebView* m_webView; 139 WebView* m_webView;
140 Persistent<WebLocalFrameImpl> m_mainFrame; 140 Persistent<WebLocalFrameImpl> m_mainFrame;
141 bool m_askedToTerminate; 141 bool m_askedToTerminate;
142 142
143 // This one is bound to and used only on the main thread. 143 // This one is bound to and used only on the main thread.
144 OwnPtr<WebServiceWorkerNetworkProvider> m_networkProvider; 144 std::unique_ptr<WebServiceWorkerNetworkProvider> m_networkProvider;
145 145
146 Persistent<WorkerInspectorProxy> m_workerInspectorProxy; 146 Persistent<WorkerInspectorProxy> m_workerInspectorProxy;
147 147
148 OwnPtr<WorkerThread> m_workerThread; 148 std::unique_ptr<WorkerThread> m_workerThread;
149 149
150 WebSharedWorkerClient* m_client; 150 WebSharedWorkerClient* m_client;
151 151
152 bool m_pauseWorkerContextOnStart; 152 bool m_pauseWorkerContextOnStart;
153 bool m_isPausedOnStart; 153 bool m_isPausedOnStart;
154 154
155 // Kept around only while main script loading is ongoing. 155 // Kept around only while main script loading is ongoing.
156 RefPtr<WorkerScriptLoader> m_mainScriptLoader; 156 RefPtr<WorkerScriptLoader> m_mainScriptLoader;
157 157
158 RefPtr<WorkerLoaderProxy> m_loaderProxy; 158 RefPtr<WorkerLoaderProxy> m_loaderProxy;
159 159
160 WebURL m_url; 160 WebURL m_url;
161 WebString m_name; 161 WebString m_name;
162 WebAddressSpace m_creationAddressSpace; 162 WebAddressSpace m_creationAddressSpace;
163 }; 163 };
164 164
165 } // namespace blink 165 } // namespace blink
166 166
167 #endif // WebSharedWorkerImpl_h 167 #endif // WebSharedWorkerImpl_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebRemoteFrameImpl.h ('k') | third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698