| OLD | NEW |
| 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 #include "platform/wtf/Vector.h" | 43 #include "platform/wtf/Vector.h" |
| 44 #include "platform/wtf/text/TextPosition.h" | 44 #include "platform/wtf/text/TextPosition.h" |
| 45 #include "v8/include/v8.h" | 45 #include "v8/include/v8.h" |
| 46 | 46 |
| 47 namespace blink { | 47 namespace blink { |
| 48 | 48 |
| 49 class DOMWrapperWorld; | 49 class DOMWrapperWorld; |
| 50 class Element; | 50 class Element; |
| 51 class KURL; | 51 class KURL; |
| 52 class LocalFrame; | 52 class LocalFrame; |
| 53 class PluginView; | |
| 54 class ScriptSourceCode; | 53 class ScriptSourceCode; |
| 55 class SecurityOrigin; | 54 class SecurityOrigin; |
| 56 | 55 |
| 57 typedef WTF::Vector<v8::Extension*> V8Extensions; | 56 typedef WTF::Vector<v8::Extension*> V8Extensions; |
| 58 | 57 |
| 59 // This class exposes methods to run script in a frame (in the main world and | 58 // This class exposes methods to run script in a frame (in the main world and |
| 60 // in isolated worlds). An instance can be obtained by using | 59 // in isolated worlds). An instance can be obtained by using |
| 61 // LocalFrame::GetScriptController(). | 60 // LocalFrame::GetScriptController(). |
| 62 class CORE_EXPORT ScriptController final | 61 class CORE_EXPORT ScriptController final |
| 63 : public GarbageCollected<ScriptController> { | 62 : public GarbageCollected<ScriptController> { |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 Vector<v8::Local<v8::Value>>* results); | 109 Vector<v8::Local<v8::Value>>* results); |
| 111 | 110 |
| 112 // Returns true if argument is a JavaScript URL. | 111 // Returns true if argument is a JavaScript URL. |
| 113 bool ExecuteScriptIfJavaScriptURL(const KURL&, Element*); | 112 bool ExecuteScriptIfJavaScriptURL(const KURL&, Element*); |
| 114 | 113 |
| 115 // 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 |
| 116 // 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 |
| 117 // ignored when evaluating resources injected into the DOM. | 116 // ignored when evaluating resources injected into the DOM. |
| 118 bool ShouldBypassMainWorldCSP(); | 117 bool ShouldBypassMainWorldCSP(); |
| 119 | 118 |
| 120 PassRefPtr<SharedPersistent<v8::Object>> CreatePluginWrapper(PluginView&); | |
| 121 | |
| 122 void EnableEval(); | 119 void EnableEval(); |
| 123 void DisableEval(const String& error_message); | 120 void DisableEval(const String& error_message); |
| 124 | 121 |
| 125 TextPosition EventHandlerPosition() const; | 122 TextPosition EventHandlerPosition() const; |
| 126 | 123 |
| 127 void ClearWindowProxy(); | 124 void ClearWindowProxy(); |
| 128 void UpdateDocument(); | 125 void UpdateDocument(); |
| 129 | 126 |
| 130 void UpdateSecurityOrigin(SecurityOrigin*); | 127 void UpdateSecurityOrigin(SecurityOrigin*); |
| 131 | 128 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 151 AccessControlStatus, | 148 AccessControlStatus, |
| 152 ExecuteScriptPolicy); | 149 ExecuteScriptPolicy); |
| 153 | 150 |
| 154 const Member<LocalFrame> frame_; | 151 const Member<LocalFrame> frame_; |
| 155 const Member<LocalWindowProxyManager> window_proxy_manager_; | 152 const Member<LocalWindowProxyManager> window_proxy_manager_; |
| 156 }; | 153 }; |
| 157 | 154 |
| 158 } // namespace blink | 155 } // namespace blink |
| 159 | 156 |
| 160 #endif // ScriptController_h | 157 #endif // ScriptController_h |
| OLD | NEW |