OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef EXTENSIONS_RENDERER_DISPATCHER_H_ | 5 #ifndef EXTENSIONS_RENDERER_DISPATCHER_H_ |
6 #define EXTENSIONS_RENDERER_DISPATCHER_H_ | 6 #define EXTENSIONS_RENDERER_DISPATCHER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 | 88 |
89 void DidCreateScriptContext(blink::WebLocalFrame* frame, | 89 void DidCreateScriptContext(blink::WebLocalFrame* frame, |
90 const v8::Local<v8::Context>& context, | 90 const v8::Local<v8::Context>& context, |
91 int world_id); | 91 int world_id); |
92 | 92 |
93 // Runs on a different thread and should only use thread safe member | 93 // Runs on a different thread and should only use thread safe member |
94 // variables. | 94 // variables. |
95 void DidInitializeServiceWorkerContextOnWorkerThread( | 95 void DidInitializeServiceWorkerContextOnWorkerThread( |
96 v8::Local<v8::Context> v8_context, | 96 v8::Local<v8::Context> v8_context, |
97 int64_t service_worker_version_id, | 97 int64_t service_worker_version_id, |
98 const GURL& url); | 98 const GURL& service_worker_scope, |
| 99 const GURL& script_url); |
99 | 100 |
100 void WillReleaseScriptContext(blink::WebLocalFrame* frame, | 101 void WillReleaseScriptContext(blink::WebLocalFrame* frame, |
101 const v8::Local<v8::Context>& context, | 102 const v8::Local<v8::Context>& context, |
102 int world_id); | 103 int world_id); |
103 | 104 |
104 // Runs on a different thread and should not use any member variables. | 105 // Runs on a different thread and should not use any member variables. |
105 static void WillDestroyServiceWorkerContextOnWorkerThread( | 106 static void WillDestroyServiceWorkerContextOnWorkerThread( |
106 v8::Local<v8::Context> v8_context, | 107 v8::Local<v8::Context> v8_context, |
107 int64_t service_worker_version_id, | 108 int64_t service_worker_version_id, |
108 const GURL& url); | 109 const GURL& service_worker_scope, |
| 110 const GURL& script_url); |
109 | 111 |
110 // This method is not allowed to run JavaScript code in the frame. | 112 // This method is not allowed to run JavaScript code in the frame. |
111 void DidCreateDocumentElement(blink::WebLocalFrame* frame); | 113 void DidCreateDocumentElement(blink::WebLocalFrame* frame); |
112 | 114 |
113 // These methods may run (untrusted) JavaScript code in the frame, and | 115 // These methods may run (untrusted) JavaScript code in the frame, and |
114 // cause |render_frame| to become invalid. | 116 // cause |render_frame| to become invalid. |
115 void RunScriptsAtDocumentStart(content::RenderFrame* render_frame); | 117 void RunScriptsAtDocumentStart(content::RenderFrame* render_frame); |
116 void RunScriptsAtDocumentEnd(content::RenderFrame* render_frame); | 118 void RunScriptsAtDocumentEnd(content::RenderFrame* render_frame); |
117 void RunScriptsAtDocumentIdle(content::RenderFrame* render_frame); | 119 void RunScriptsAtDocumentIdle(content::RenderFrame* render_frame); |
118 | 120 |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
296 // if this renderer is a WebView guest render process. Otherwise, this will be | 298 // if this renderer is a WebView guest render process. Otherwise, this will be |
297 // empty. | 299 // empty. |
298 std::string webview_partition_id_; | 300 std::string webview_partition_id_; |
299 | 301 |
300 DISALLOW_COPY_AND_ASSIGN(Dispatcher); | 302 DISALLOW_COPY_AND_ASSIGN(Dispatcher); |
301 }; | 303 }; |
302 | 304 |
303 } // namespace extensions | 305 } // namespace extensions |
304 | 306 |
305 #endif // EXTENSIONS_RENDERER_DISPATCHER_H_ | 307 #endif // EXTENSIONS_RENDERER_DISPATCHER_H_ |
OLD | NEW |