| 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 "wtf/Noncopyable.h" | 43 #include "wtf/Noncopyable.h" |
| 44 #include "wtf/Vector.h" | 44 #include "wtf/Vector.h" |
| 45 #include "wtf/text/TextPosition.h" | 45 #include "wtf/text/TextPosition.h" |
| 46 #include <v8.h> | 46 #include <v8.h> |
| 47 | 47 |
| 48 namespace blink { | 48 namespace blink { |
| 49 | 49 |
| 50 class DOMWrapperWorld; | 50 class DOMWrapperWorld; |
| 51 class Element; | 51 class Element; |
| 52 class KURL; | 52 class KURL; |
| 53 class PluginClient; |
| 53 class ScriptSourceCode; | 54 class ScriptSourceCode; |
| 54 class SecurityOrigin; | 55 class SecurityOrigin; |
| 55 class Widget; | 56 class Widget; |
| 56 | 57 |
| 57 typedef WTF::Vector<v8::Extension*> V8Extensions; | 58 typedef WTF::Vector<v8::Extension*> V8Extensions; |
| 58 | 59 |
| 59 | 60 |
| 60 class CORE_EXPORT ScriptController final | 61 class CORE_EXPORT ScriptController final |
| 61 : public GarbageCollected<ScriptController> { | 62 : public GarbageCollected<ScriptController> { |
| 62 WTF_MAKE_NONCOPYABLE(ScriptController); | 63 WTF_MAKE_NONCOPYABLE(ScriptController); |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 | 106 |
| 106 // Returns true if argument is a JavaScript URL. | 107 // Returns true if argument is a JavaScript URL. |
| 107 bool executeScriptIfJavaScriptURL(const KURL&, Element*); | 108 bool executeScriptIfJavaScriptURL(const KURL&, Element*); |
| 108 | 109 |
| 109 // Returns true if the current world is isolated, and has its own Content | 110 // Returns true if the current world is isolated, and has its own Content |
| 110 // Security Policy. In this case, the policy of the main world should be | 111 // Security Policy. In this case, the policy of the main world should be |
| 111 // ignored when evaluating resources injected into the DOM. | 112 // ignored when evaluating resources injected into the DOM. |
| 112 bool shouldBypassMainWorldCSP(); | 113 bool shouldBypassMainWorldCSP(); |
| 113 | 114 |
| 114 PassRefPtr<SharedPersistent<v8::Object>> createPluginWrapper(Widget*); | 115 PassRefPtr<SharedPersistent<v8::Object>> createPluginWrapper(Widget*); |
| 116 PassRefPtr<SharedPersistent<v8::Object>> createPluginWrapper(PluginClient*); |
| 115 | 117 |
| 116 void enableEval(); | 118 void enableEval(); |
| 117 void disableEval(const String& errorMessage); | 119 void disableEval(const String& errorMessage); |
| 118 | 120 |
| 119 TextPosition eventHandlerPosition() const; | 121 TextPosition eventHandlerPosition() const; |
| 120 | 122 |
| 121 void clearWindowProxy(); | 123 void clearWindowProxy(); |
| 122 void updateDocument(); | 124 void updateDocument(); |
| 123 | 125 |
| 124 void updateSecurityOrigin(SecurityOrigin*); | 126 void updateSecurityOrigin(SecurityOrigin*); |
| (...skipping 20 matching lines...) Expand all Loading... |
| 145 v8::Local<v8::Value> evaluateScriptInMainWorld(const ScriptSourceCode&, | 147 v8::Local<v8::Value> evaluateScriptInMainWorld(const ScriptSourceCode&, |
| 146 AccessControlStatus, | 148 AccessControlStatus, |
| 147 ExecuteScriptPolicy); | 149 ExecuteScriptPolicy); |
| 148 | 150 |
| 149 Member<LocalWindowProxyManager> m_windowProxyManager; | 151 Member<LocalWindowProxyManager> m_windowProxyManager; |
| 150 }; | 152 }; |
| 151 | 153 |
| 152 } // namespace blink | 154 } // namespace blink |
| 153 | 155 |
| 154 #endif // ScriptController_h | 156 #endif // ScriptController_h |
| OLD | NEW |