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