| 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   // This method may run (untrusted) JavaScript code in the frame. | 
|  | 114   void AfterDidCreateDocumentElement( | 
|  | 115       const base::WeakPtr<content::RenderFrame>& render_frame); | 
|  | 116   void AfterDidFinishDocumentLoad( | 
|  | 117       const base::WeakPtr<content::RenderFrame>& render_frame); | 
| 112 | 118 | 
| 113   void OnExtensionResponse(int request_id, | 119   void OnExtensionResponse(int request_id, | 
| 114                            bool success, | 120                            bool success, | 
| 115                            const base::ListValue& response, | 121                            const base::ListValue& response, | 
| 116                            const std::string& error); | 122                            const std::string& error); | 
| 117 | 123 | 
| 118   // Dispatches the event named |event_name| to all render views. | 124   // Dispatches the event named |event_name| to all render views. | 
| 119   void DispatchEvent(const std::string& extension_id, | 125   void DispatchEvent(const std::string& extension_id, | 
| 120                      const std::string& event_name) const; | 126                      const std::string& event_name) const; | 
| 121 | 127 | 
| (...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 | 313   // if this renderer is a WebView guest render process. Otherwise, this will be | 
| 308   // empty. | 314   // empty. | 
| 309   std::string webview_partition_id_; | 315   std::string webview_partition_id_; | 
| 310 | 316 | 
| 311   DISALLOW_COPY_AND_ASSIGN(Dispatcher); | 317   DISALLOW_COPY_AND_ASSIGN(Dispatcher); | 
| 312 }; | 318 }; | 
| 313 | 319 | 
| 314 }  // namespace extensions | 320 }  // namespace extensions | 
| 315 | 321 | 
| 316 #endif  // EXTENSIONS_RENDERER_DISPATCHER_H_ | 322 #endif  // EXTENSIONS_RENDERER_DISPATCHER_H_ | 
| OLD | NEW | 
|---|