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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 public: | 70 public: |
71 enum ExecuteScriptPolicy { | 71 enum ExecuteScriptPolicy { |
72 ExecuteScriptWhenScriptsDisabled, | 72 ExecuteScriptWhenScriptsDisabled, |
73 DoNotExecuteScriptWhenScriptsDisabled | 73 DoNotExecuteScriptWhenScriptsDisabled |
74 }; | 74 }; |
75 | 75 |
76 ScriptController(LocalFrame*); | 76 ScriptController(LocalFrame*); |
77 ~ScriptController(); | 77 ~ScriptController(); |
78 | 78 |
79 bool initializeMainWorld(); | 79 bool initializeMainWorld(); |
80 V8WindowShell* windowShell(DOMWrapperWorld*); | 80 V8WindowShell* windowShell(DOMWrapperWorld&); |
81 V8WindowShell* existingWindowShell(DOMWrapperWorld*); | 81 V8WindowShell* existingWindowShell(DOMWrapperWorld&); |
82 | 82 |
83 // Evaluate JavaScript in the main world. | 83 // Evaluate JavaScript in the main world. |
84 void executeScriptInMainWorld(const String&, ExecuteScriptPolicy = DoNotExec
uteScriptWhenScriptsDisabled); | 84 void executeScriptInMainWorld(const String&, ExecuteScriptPolicy = DoNotExec
uteScriptWhenScriptsDisabled); |
85 void executeScriptInMainWorld(const ScriptSourceCode&, AccessControlStatus =
NotSharableCrossOrigin); | 85 void executeScriptInMainWorld(const ScriptSourceCode&, AccessControlStatus =
NotSharableCrossOrigin); |
86 ScriptValue executeScriptInMainWorldAndReturnValue(const ScriptSourceCode&); | 86 ScriptValue executeScriptInMainWorldAndReturnValue(const ScriptSourceCode&); |
87 v8::Local<v8::Value> executeScriptAndReturnValue(v8::Handle<v8::Context>, co
nst ScriptSourceCode&, AccessControlStatus = NotSharableCrossOrigin); | 87 v8::Local<v8::Value> executeScriptAndReturnValue(v8::Handle<v8::Context>, co
nst ScriptSourceCode&, AccessControlStatus = NotSharableCrossOrigin); |
88 | 88 |
89 // Executes JavaScript in an isolated world. The script gets its own global
scope, | 89 // Executes JavaScript in an isolated world. The script gets its own global
scope, |
90 // its own prototypes for intrinsic JavaScript objects (String, Array, and s
o-on), | 90 // its own prototypes for intrinsic JavaScript objects (String, Array, and s
o-on), |
91 // and its own wrappers for all DOM nodes and DOM constructors. | 91 // and its own wrappers for all DOM nodes and DOM constructors. |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 // invalidate all sub-objects which are associated with that plugin. | 168 // invalidate all sub-objects which are associated with that plugin. |
169 // The frame keeps a NPObject reference for each item on the list. | 169 // The frame keeps a NPObject reference for each item on the list. |
170 PluginObjectMap m_pluginObjects; | 170 PluginObjectMap m_pluginObjects; |
171 | 171 |
172 NPObject* m_windowScriptNPObject; | 172 NPObject* m_windowScriptNPObject; |
173 }; | 173 }; |
174 | 174 |
175 } // namespace WebCore | 175 } // namespace WebCore |
176 | 176 |
177 #endif // ScriptController_h | 177 #endif // ScriptController_h |
OLD | NEW |