OLD | NEW |
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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 const String& sourceCode, | 60 const String& sourceCode, |
61 std::unique_ptr<Vector<char>> cachedMetaData, | 61 std::unique_ptr<Vector<char>> cachedMetaData, |
62 WorkerThreadStartMode startMode, | 62 WorkerThreadStartMode startMode, |
63 const Vector<CSPHeaderAndType>* contentSecurityPolicyHeaders, | 63 const Vector<CSPHeaderAndType>* contentSecurityPolicyHeaders, |
64 const String& referrerPolicy, | 64 const String& referrerPolicy, |
65 const SecurityOrigin* starterOrigin, | 65 const SecurityOrigin* starterOrigin, |
66 WorkerClients* workerClients, | 66 WorkerClients* workerClients, |
67 WebAddressSpace addressSpace, | 67 WebAddressSpace addressSpace, |
68 const Vector<String>* originTrialTokens, | 68 const Vector<String>* originTrialTokens, |
69 std::unique_ptr<WorkerSettings> workerSettings, | 69 std::unique_ptr<WorkerSettings> workerSettings, |
70 WorkerV8Settings workerV8Settings) { | 70 WorkerV8Settings workerV8Settings, |
| 71 bool inspectorNetworkCapability) { |
71 return WTF::wrapUnique(new WorkerThreadStartupData( | 72 return WTF::wrapUnique(new WorkerThreadStartupData( |
72 scriptURL, userAgent, sourceCode, std::move(cachedMetaData), startMode, | 73 scriptURL, userAgent, sourceCode, std::move(cachedMetaData), startMode, |
73 contentSecurityPolicyHeaders, referrerPolicy, starterOrigin, | 74 contentSecurityPolicyHeaders, referrerPolicy, starterOrigin, |
74 workerClients, addressSpace, originTrialTokens, | 75 workerClients, addressSpace, originTrialTokens, |
75 std::move(workerSettings), workerV8Settings)); | 76 std::move(workerSettings), workerV8Settings, |
| 77 inspectorNetworkCapability)); |
76 } | 78 } |
77 | 79 |
78 ~WorkerThreadStartupData(); | 80 ~WorkerThreadStartupData(); |
79 | 81 |
80 KURL m_scriptURL; | 82 KURL m_scriptURL; |
81 String m_userAgent; | 83 String m_userAgent; |
82 String m_sourceCode; | 84 String m_sourceCode; |
83 std::unique_ptr<Vector<char>> m_cachedMetaData; | 85 std::unique_ptr<Vector<char>> m_cachedMetaData; |
84 WorkerThreadStartMode m_startMode; | 86 WorkerThreadStartMode m_startMode; |
85 std::unique_ptr<Vector<CSPHeaderAndType>> m_contentSecurityPolicyHeaders; | 87 std::unique_ptr<Vector<CSPHeaderAndType>> m_contentSecurityPolicyHeaders; |
(...skipping 20 matching lines...) Expand all Loading... |
106 // persistent reference. If the worker thread creation context | 108 // persistent reference. If the worker thread creation context |
107 // supplies no extra 'clients', m_workerClients can be left as empty/null. | 109 // supplies no extra 'clients', m_workerClients can be left as empty/null. |
108 CrossThreadPersistent<WorkerClients> m_workerClients; | 110 CrossThreadPersistent<WorkerClients> m_workerClients; |
109 | 111 |
110 WebAddressSpace m_addressSpace; | 112 WebAddressSpace m_addressSpace; |
111 | 113 |
112 std::unique_ptr<WorkerSettings> m_workerSettings; | 114 std::unique_ptr<WorkerSettings> m_workerSettings; |
113 | 115 |
114 WorkerV8Settings m_workerV8Settings; | 116 WorkerV8Settings m_workerV8Settings; |
115 | 117 |
| 118 const bool m_inspectorNetworkCapability; |
| 119 |
116 private: | 120 private: |
117 WorkerThreadStartupData( | 121 WorkerThreadStartupData( |
118 const KURL& scriptURL, | 122 const KURL& scriptURL, |
119 const String& userAgent, | 123 const String& userAgent, |
120 const String& sourceCode, | 124 const String& sourceCode, |
121 std::unique_ptr<Vector<char>> cachedMetaData, | 125 std::unique_ptr<Vector<char>> cachedMetaData, |
122 WorkerThreadStartMode, | 126 WorkerThreadStartMode, |
123 const Vector<CSPHeaderAndType>* contentSecurityPolicyHeaders, | 127 const Vector<CSPHeaderAndType>* contentSecurityPolicyHeaders, |
124 const String& referrerPolicy, | 128 const String& referrerPolicy, |
125 const SecurityOrigin*, | 129 const SecurityOrigin*, |
126 WorkerClients*, | 130 WorkerClients*, |
127 WebAddressSpace, | 131 WebAddressSpace, |
128 const Vector<String>* originTrialTokens, | 132 const Vector<String>* originTrialTokens, |
129 std::unique_ptr<WorkerSettings>, | 133 std::unique_ptr<WorkerSettings>, |
130 WorkerV8Settings); | 134 WorkerV8Settings, |
| 135 bool inspectorNetworkCapability); |
131 }; | 136 }; |
132 | 137 |
133 } // namespace blink | 138 } // namespace blink |
134 | 139 |
135 #endif // WorkerThreadStartupData_h | 140 #endif // WorkerThreadStartupData_h |
OLD | NEW |