Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(118)

Side by Side Diff: extensions/renderer/dispatcher.h

Issue 1642283002: Deal with frame removal by content scripts (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Up to #50: ExtensionFrameHelper callbacks, comments Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698