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

Side by Side Diff: Source/core/workers/WorkerThreadStartupData.h

Issue 106353005: Expose performance.memory in workers (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@Perf-Memory-SharedWorker
Patch Set: Introduce WorkerSettings Created 6 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 15 matching lines...) Expand all
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 WorkerThreadStartupData_h 31 #ifndef WorkerThreadStartupData_h
32 #define WorkerThreadStartupData_h 32 #define WorkerThreadStartupData_h
33 33
34 #include "core/frame/ContentSecurityPolicy.h" 34 #include "core/frame/ContentSecurityPolicy.h"
35 #include "core/workers/WorkerClients.h" 35 #include "core/workers/WorkerClients.h"
36 #include "core/workers/WorkerSettings.h"
36 #include "core/workers/WorkerThread.h" 37 #include "core/workers/WorkerThread.h"
37 #include "platform/weborigin/KURL.h" 38 #include "platform/weborigin/KURL.h"
38 #include "wtf/Forward.h" 39 #include "wtf/Forward.h"
39 #include "wtf/Noncopyable.h" 40 #include "wtf/Noncopyable.h"
40 41
41 namespace WebCore { 42 namespace WebCore {
42 43
43 class WorkerClients; 44 class WorkerClients;
44 45
45 struct WorkerThreadStartupData { 46 struct WorkerThreadStartupData {
46 WTF_MAKE_NONCOPYABLE(WorkerThreadStartupData); WTF_MAKE_FAST_ALLOCATED; 47 WTF_MAKE_NONCOPYABLE(WorkerThreadStartupData); WTF_MAKE_FAST_ALLOCATED;
47 public: 48 public:
48 static PassOwnPtr<WorkerThreadStartupData> create(const KURL& scriptURL, con st String& userAgent, const String& sourceCode, WorkerThreadStartMode startMode, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType contentS ecurityPolicyType, PassOwnPtr<WorkerClients> workerClients) 49 static PassOwnPtr<WorkerThreadStartupData> create(const KURL& scriptURL, con st String& userAgent, const String& sourceCode, WorkerThreadStartMode startMode, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType contentS ecurityPolicyType, PassOwnPtr<WorkerClients> workerClients, PassOwnPtr<WorkerSet tings> workerSettings)
49 { 50 {
50 return adoptPtr(new WorkerThreadStartupData(scriptURL, userAgent, source Code, startMode, contentSecurityPolicy, contentSecurityPolicyType, workerClients )); 51 return adoptPtr(new WorkerThreadStartupData(scriptURL, userAgent, source Code, startMode, contentSecurityPolicy, contentSecurityPolicyType, workerClients , workerSettings));
51 } 52 }
52 53
53 ~WorkerThreadStartupData(); 54 ~WorkerThreadStartupData();
54 55
55 KURL m_scriptURL; 56 KURL m_scriptURL;
56 String m_userAgent; 57 String m_userAgent;
57 String m_sourceCode; 58 String m_sourceCode;
58 WorkerThreadStartMode m_startMode; 59 WorkerThreadStartMode m_startMode;
59 String m_contentSecurityPolicy; 60 String m_contentSecurityPolicy;
60 ContentSecurityPolicy::HeaderType m_contentSecurityPolicyType; 61 ContentSecurityPolicy::HeaderType m_contentSecurityPolicyType;
61 OwnPtr<WorkerClients> m_workerClients; 62 OwnPtr<WorkerClients> m_workerClients;
63 OwnPtr<WorkerSettings> m_workerSettings;
62 64
63 private: 65 private:
64 WorkerThreadStartupData(const KURL& scriptURL, const String& userAgent, cons t String& sourceCode, WorkerThreadStartMode, const String& contentSecurityPolicy , ContentSecurityPolicy::HeaderType contentSecurityPolicyType, PassOwnPtr<Worker Clients>); 66 WorkerThreadStartupData(const KURL& scriptURL, const String& userAgent, cons t String& sourceCode, WorkerThreadStartMode, const String& contentSecurityPolicy , ContentSecurityPolicy::HeaderType contentSecurityPolicyType, PassOwnPtr<Worker Clients>, PassOwnPtr<WorkerSettings>);
65 }; 67 };
66 68
67 } // namespace WebCore 69 } // namespace WebCore
68 70
69 #endif // WorkerThreadStartupData_h 71 #endif // WorkerThreadStartupData_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698