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

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: Last nits Created 4 years, 9 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
« no previous file with comments | « content/renderer/render_frame_impl.cc ('k') | extensions/renderer/dispatcher.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
112 113
114 // These methods may run (untrusted) JavaScript code in the frame, and
115 // cause |render_frame| to become invalid.
116 void RunScriptsAtDocumentStart(content::RenderFrame* render_frame);
117 void RunScriptsAtDocumentEnd(content::RenderFrame* render_frame);
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
122 // Shared implementation of the various MessageInvoke IPCs. 128 // Shared implementation of the various MessageInvoke IPCs.
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
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_
OLDNEW
« no previous file with comments | « content/renderer/render_frame_impl.cc ('k') | extensions/renderer/dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698