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

Side by Side Diff: third_party/WebKit/Source/bindings/core/v8/ScriptController.h

Issue 2878553002: Reland "Simplify FrameLoader::Clear(), remove FrameLoader::check_timer" (Closed)
Patch Set: Don't call CheckCompleted in HTMLFrameOwnerElement Created 3 years, 7 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 | « no previous file | third_party/WebKit/Source/bindings/core/v8/ScriptController.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008, 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2008, 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 Vector<v8::Local<v8::Value>>* results); 109 Vector<v8::Local<v8::Value>>* results);
110 110
111 // Returns true if argument is a JavaScript URL. 111 // Returns true if argument is a JavaScript URL.
112 bool ExecuteScriptIfJavaScriptURL(const KURL&, Element*); 112 bool ExecuteScriptIfJavaScriptURL(const KURL&, Element*);
113 113
114 // Returns true if the current world is isolated, and has its own Content 114 // Returns true if the current world is isolated, and has its own Content
115 // Security Policy. In this case, the policy of the main world should be 115 // Security Policy. In this case, the policy of the main world should be
116 // ignored when evaluating resources injected into the DOM. 116 // ignored when evaluating resources injected into the DOM.
117 bool ShouldBypassMainWorldCSP(); 117 bool ShouldBypassMainWorldCSP();
118 118
119 void EnableEval();
120 void DisableEval(const String& error_message); 119 void DisableEval(const String& error_message);
121 120
122 TextPosition EventHandlerPosition() const; 121 TextPosition EventHandlerPosition() const;
123 122
124 void ClearWindowProxy(); 123 void ClearWindowProxy();
125 void UpdateDocument(); 124 void UpdateDocument();
126 125
127 void UpdateSecurityOrigin(SecurityOrigin*); 126 void UpdateSecurityOrigin(SecurityOrigin*);
128 127
129 void ClearForClose(); 128 void ClearForClose();
130 129
131 // Registers a v8 extension to be available on webpages. Will only 130 // Registers a v8 extension to be available on webpages. Will only
132 // affect v8 contexts initialized after this call. Takes ownership of 131 // affect v8 contexts initialized after this call. Takes ownership of
133 // the v8::Extension object passed. 132 // the v8::Extension object passed.
134 static void RegisterExtensionIfNeeded(v8::Extension*); 133 static void RegisterExtensionIfNeeded(v8::Extension*);
135 static V8Extensions& RegisteredExtensions(); 134 static V8Extensions& RegisteredExtensions();
136 135
137 private: 136 private:
138 ScriptController(LocalFrame& frame, 137 ScriptController(LocalFrame& frame,
139 LocalWindowProxyManager& window_proxy_manager) 138 LocalWindowProxyManager& window_proxy_manager)
140 : frame_(&frame), window_proxy_manager_(&window_proxy_manager) {} 139 : frame_(&frame), window_proxy_manager_(&window_proxy_manager) {}
141 140
142 LocalFrame* GetFrame() const { return frame_; } 141 LocalFrame* GetFrame() const { return frame_; }
143 v8::Isolate* GetIsolate() const { 142 v8::Isolate* GetIsolate() const {
144 return window_proxy_manager_->GetIsolate(); 143 return window_proxy_manager_->GetIsolate();
145 } 144 }
145 void EnableEval();
146 146
147 v8::Local<v8::Value> EvaluateScriptInMainWorld(const ScriptSourceCode&, 147 v8::Local<v8::Value> EvaluateScriptInMainWorld(const ScriptSourceCode&,
148 AccessControlStatus, 148 AccessControlStatus,
149 ExecuteScriptPolicy); 149 ExecuteScriptPolicy);
150 150
151 const Member<LocalFrame> frame_; 151 const Member<LocalFrame> frame_;
152 const Member<LocalWindowProxyManager> window_proxy_manager_; 152 const Member<LocalWindowProxyManager> window_proxy_manager_;
153 }; 153 };
154 154
155 } // namespace blink 155 } // namespace blink
156 156
157 #endif // ScriptController_h 157 #endif // ScriptController_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/core/v8/ScriptController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698