Chromium Code Reviews| 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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 101 | 101 |
| 102 void WillReleaseScriptContext(blink::WebLocalFrame* frame, | 102 void WillReleaseScriptContext(blink::WebLocalFrame* frame, |
| 103 const v8::Local<v8::Context>& context, | 103 const v8::Local<v8::Context>& context, |
| 104 int world_id); | 104 int world_id); |
| 105 | 105 |
| 106 // Runs on a different thread and should not use any member variables. | 106 // Runs on a different thread and should not use any member variables. |
| 107 static void WillDestroyServiceWorkerContextOnWorkerThread( | 107 static void WillDestroyServiceWorkerContextOnWorkerThread( |
| 108 v8::Local<v8::Context> v8_context, | 108 v8::Local<v8::Context> v8_context, |
| 109 const GURL& url); | 109 const GURL& url); |
| 110 | 110 |
| 111 // This method is not allowed to run JavaScript code in the frame. | |
|
Devlin
2016/02/12 22:21:56
Can we DCHECK this (in general for DidCreateDocume
robwu
2016/02/12 22:37:13
Blink has ScriptForbiddenScope, but it's not publi
Devlin
2016/02/12 22:51:01
SG. Can we put an artfully placed TODO somewhere?
robwu
2016/02/12 23:24:49
I'll add a comment at the next update to the macro
| |
| 111 void DidCreateDocumentElement(blink::WebLocalFrame* frame); | 112 void DidCreateDocumentElement(blink::WebLocalFrame* frame); |
| 113 // This method may run (untrusted) JavaScript code in the frame. | |
| 114 void AfterDidCreateDocumentElement(content::RenderFrame* render_frame); | |
| 115 void AfterDidFinishDocumentLoad(content::RenderFrame* render_frame); | |
| 112 | 116 |
| 113 void OnExtensionResponse(int request_id, | 117 void OnExtensionResponse(int request_id, |
| 114 bool success, | 118 bool success, |
| 115 const base::ListValue& response, | 119 const base::ListValue& response, |
| 116 const std::string& error); | 120 const std::string& error); |
| 117 | 121 |
| 118 // Dispatches the event named |event_name| to all render views. | 122 // Dispatches the event named |event_name| to all render views. |
| 119 void DispatchEvent(const std::string& extension_id, | 123 void DispatchEvent(const std::string& extension_id, |
| 120 const std::string& event_name) const; | 124 const std::string& event_name) const; |
| 121 | 125 |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 307 // if this renderer is a WebView guest render process. Otherwise, this will be | 311 // if this renderer is a WebView guest render process. Otherwise, this will be |
| 308 // empty. | 312 // empty. |
| 309 std::string webview_partition_id_; | 313 std::string webview_partition_id_; |
| 310 | 314 |
| 311 DISALLOW_COPY_AND_ASSIGN(Dispatcher); | 315 DISALLOW_COPY_AND_ASSIGN(Dispatcher); |
| 312 }; | 316 }; |
| 313 | 317 |
| 314 } // namespace extensions | 318 } // namespace extensions |
| 315 | 319 |
| 316 #endif // EXTENSIONS_RENDERER_DISPATCHER_H_ | 320 #endif // EXTENSIONS_RENDERER_DISPATCHER_H_ |
| OLD | NEW |