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. | |
111 void DidCreateDocumentElement(blink::WebLocalFrame* frame); | 112 void DidCreateDocumentElement(blink::WebLocalFrame* frame); |
113 // These methods may run (untrusted) JavaScript code in the frame, and | |
Devlin
2016/02/16 18:37:37
nit: let's put a newline after line 112.
| |
114 // cause |render_frame| to become invalid. | |
115 void AfterDidCreateDocumentElement(content::RenderFrame* render_frame); | |
116 void AfterDidFinishDocumentLoad(content::RenderFrame* render_frame); | |
112 | 117 |
113 void OnExtensionResponse(int request_id, | 118 void OnExtensionResponse(int request_id, |
114 bool success, | 119 bool success, |
115 const base::ListValue& response, | 120 const base::ListValue& response, |
116 const std::string& error); | 121 const std::string& error); |
117 | 122 |
118 // Dispatches the event named |event_name| to all render views. | 123 // Dispatches the event named |event_name| to all render views. |
119 void DispatchEvent(const std::string& extension_id, | 124 void DispatchEvent(const std::string& extension_id, |
120 const std::string& event_name) const; | 125 const std::string& event_name) const; |
121 | 126 |
(...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 | 312 // if this renderer is a WebView guest render process. Otherwise, this will be |
308 // empty. | 313 // empty. |
309 std::string webview_partition_id_; | 314 std::string webview_partition_id_; |
310 | 315 |
311 DISALLOW_COPY_AND_ASSIGN(Dispatcher); | 316 DISALLOW_COPY_AND_ASSIGN(Dispatcher); |
312 }; | 317 }; |
313 | 318 |
314 } // namespace extensions | 319 } // namespace extensions |
315 | 320 |
316 #endif // EXTENSIONS_RENDERER_DISPATCHER_H_ | 321 #endif // EXTENSIONS_RENDERER_DISPATCHER_H_ |
OLD | NEW |