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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 ExecuteScriptWhenScriptsDisabled, | 72 ExecuteScriptWhenScriptsDisabled, |
73 DoNotExecuteScriptWhenScriptsDisabled | 73 DoNotExecuteScriptWhenScriptsDisabled |
74 }; | 74 }; |
75 | 75 |
76 static ScriptController* create(LocalFrame* frame) { | 76 static ScriptController* create(LocalFrame* frame) { |
77 return new ScriptController(frame); | 77 return new ScriptController(frame); |
78 } | 78 } |
79 | 79 |
80 DECLARE_TRACE(); | 80 DECLARE_TRACE(); |
81 | 81 |
82 bool initializeMainWorld(); | 82 // This returns an initialized window proxy. (If the window proxy is not |
| 83 // yet initialized, it's implicitly initialized at the first access.) |
83 WindowProxy* windowProxy(DOMWrapperWorld&); | 84 WindowProxy* windowProxy(DOMWrapperWorld&); |
84 | 85 |
85 // Evaluate JavaScript in the main world. | 86 // Evaluate JavaScript in the main world. |
86 void executeScriptInMainWorld( | 87 void executeScriptInMainWorld( |
87 const String&, | 88 const String&, |
88 ExecuteScriptPolicy = DoNotExecuteScriptWhenScriptsDisabled); | 89 ExecuteScriptPolicy = DoNotExecuteScriptWhenScriptsDisabled); |
89 void executeScriptInMainWorld(const ScriptSourceCode&, | 90 void executeScriptInMainWorld(const ScriptSourceCode&, |
90 AccessControlStatus = NotSharableCrossOrigin); | 91 AccessControlStatus = NotSharableCrossOrigin); |
91 v8::Local<v8::Value> executeScriptInMainWorldAndReturnValue( | 92 v8::Local<v8::Value> executeScriptInMainWorldAndReturnValue( |
92 const ScriptSourceCode&, | 93 const ScriptSourceCode&, |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 v8::Local<v8::Value> evaluateScriptInMainWorld(const ScriptSourceCode&, | 166 v8::Local<v8::Value> evaluateScriptInMainWorld(const ScriptSourceCode&, |
166 AccessControlStatus, | 167 AccessControlStatus, |
167 ExecuteScriptPolicy); | 168 ExecuteScriptPolicy); |
168 | 169 |
169 Member<WindowProxyManager> m_windowProxyManager; | 170 Member<WindowProxyManager> m_windowProxyManager; |
170 }; | 171 }; |
171 | 172 |
172 } // namespace blink | 173 } // namespace blink |
173 | 174 |
174 #endif // ScriptController_h | 175 #endif // ScriptController_h |
OLD | NEW |