| 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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 | 95 |
| 96 void DidCreateScriptContext(blink::WebLocalFrame* frame, | 96 void DidCreateScriptContext(blink::WebLocalFrame* frame, |
| 97 const v8::Local<v8::Context>& context, | 97 const v8::Local<v8::Context>& context, |
| 98 int extension_group, | 98 int extension_group, |
| 99 int world_id); | 99 int world_id); |
| 100 | 100 |
| 101 // Runs on a different thread and should only use thread safe member | 101 // Runs on a different thread and should only use thread safe member |
| 102 // variables. | 102 // variables. |
| 103 void DidInitializeServiceWorkerContextOnWorkerThread( | 103 void DidInitializeServiceWorkerContextOnWorkerThread( |
| 104 v8::Local<v8::Context> v8_context, | 104 v8::Local<v8::Context> v8_context, |
| 105 int embedded_worker_id, | 105 int64_t service_worker_version_id, |
| 106 const GURL& url); | 106 const GURL& url); |
| 107 | 107 |
| 108 void WillReleaseScriptContext(blink::WebLocalFrame* frame, | 108 void WillReleaseScriptContext(blink::WebLocalFrame* frame, |
| 109 const v8::Local<v8::Context>& context, | 109 const v8::Local<v8::Context>& context, |
| 110 int world_id); | 110 int world_id); |
| 111 | 111 |
| 112 // Runs on a different thread and should not use any member variables. | 112 // Runs on a different thread and should not use any member variables. |
| 113 static void WillDestroyServiceWorkerContextOnWorkerThread( | 113 static void WillDestroyServiceWorkerContextOnWorkerThread( |
| 114 v8::Local<v8::Context> v8_context, | 114 v8::Local<v8::Context> v8_context, |
| 115 int embedded_worker_id, | 115 int64_t service_worker_version_id, |
| 116 const GURL& url); | 116 const GURL& url); |
| 117 | 117 |
| 118 // This method is not allowed to run JavaScript code in the frame. | 118 // This method is not allowed to run JavaScript code in the frame. |
| 119 void DidCreateDocumentElement(blink::WebLocalFrame* frame); | 119 void DidCreateDocumentElement(blink::WebLocalFrame* frame); |
| 120 | 120 |
| 121 // These methods may run (untrusted) JavaScript code in the frame, and | 121 // These methods may run (untrusted) JavaScript code in the frame, and |
| 122 // cause |render_frame| to become invalid. | 122 // cause |render_frame| to become invalid. |
| 123 void RunScriptsAtDocumentStart(content::RenderFrame* render_frame); | 123 void RunScriptsAtDocumentStart(content::RenderFrame* render_frame); |
| 124 void RunScriptsAtDocumentEnd(content::RenderFrame* render_frame); | 124 void RunScriptsAtDocumentEnd(content::RenderFrame* render_frame); |
| 125 | 125 |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 // if this renderer is a WebView guest render process. Otherwise, this will be | 320 // if this renderer is a WebView guest render process. Otherwise, this will be |
| 321 // empty. | 321 // empty. |
| 322 std::string webview_partition_id_; | 322 std::string webview_partition_id_; |
| 323 | 323 |
| 324 DISALLOW_COPY_AND_ASSIGN(Dispatcher); | 324 DISALLOW_COPY_AND_ASSIGN(Dispatcher); |
| 325 }; | 325 }; |
| 326 | 326 |
| 327 } // namespace extensions | 327 } // namespace extensions |
| 328 | 328 |
| 329 #endif // EXTENSIONS_RENDERER_DISPATCHER_H_ | 329 #endif // EXTENSIONS_RENDERER_DISPATCHER_H_ |
| OLD | NEW |