OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. |
3 * Copyright (C) 2012 Google Inc. All Rights Reserved. | 3 * Copyright (C) 2012 Google Inc. All Rights Reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
77 void disableEval(const String& errorMessage); | 77 void disableEval(const String& errorMessage); |
78 DOMWindow* executingWindow() const; | 78 DOMWindow* executingWindow() const; |
79 String userAgent(const KURL&) const; | 79 String userAgent(const KURL&) const; |
80 void postTask(PassOwnPtr<ExecutionContextTask>); | 80 void postTask(PassOwnPtr<ExecutionContextTask>); |
81 void postTask(const Closure&); | 81 void postTask(const Closure&); |
82 double timerAlignmentInterval() const; | 82 double timerAlignmentInterval() const; |
83 | 83 |
84 bool shouldSanitizeScriptError(const String& sourceURL, AccessControlStatus) ; | 84 bool shouldSanitizeScriptError(const String& sourceURL, AccessControlStatus) ; |
85 void reportException(PassRefPtrWillBeRawPtr<ErrorEvent>, PassRefPtr<ScriptCa llStack>, AccessControlStatus); | 85 void reportException(PassRefPtrWillBeRawPtr<ErrorEvent>, PassRefPtr<ScriptCa llStack>, AccessControlStatus); |
86 | 86 |
87 void initScriptEnabled() { } | |
abarth-chromium
2014/06/26 19:53:37
This function shouldn't be needed. What breaks if
mmal
2014/06/27 19:39:16
Done.
| |
88 bool scriptEnabled() { return m_scriptEnabled; } | |
89 | |
87 void addConsoleMessage(MessageSource, MessageLevel, const String& message, c onst String& sourceURL, unsigned lineNumber); | 90 void addConsoleMessage(MessageSource, MessageLevel, const String& message, c onst String& sourceURL, unsigned lineNumber); |
88 void addConsoleMessage(MessageSource, MessageLevel, const String& message, S criptState* = 0); | 91 void addConsoleMessage(MessageSource, MessageLevel, const String& message, S criptState* = 0); |
89 | 92 |
90 PublicURLManager& publicURLManager(); | 93 PublicURLManager& publicURLManager(); |
91 | 94 |
92 // Active objects are not garbage collected even if inaccessible, e.g. becau se their activity may result in callbacks being invoked. | 95 // Active objects are not garbage collected even if inaccessible, e.g. becau se their activity may result in callbacks being invoked. |
93 bool hasPendingActivity(); | 96 bool hasPendingActivity(); |
94 | 97 |
95 void suspendActiveDOMObjects(); | 98 void suspendActiveDOMObjects(); |
96 void resumeActiveDOMObjects(); | 99 void resumeActiveDOMObjects(); |
(...skipping 24 matching lines...) Expand all Loading... | |
121 void enforceSandboxFlags(SandboxFlags mask); | 124 void enforceSandboxFlags(SandboxFlags mask); |
122 | 125 |
123 PassOwnPtr<LifecycleNotifier<ExecutionContext> > createLifecycleNotifier(); | 126 PassOwnPtr<LifecycleNotifier<ExecutionContext> > createLifecycleNotifier(); |
124 | 127 |
125 virtual EventQueue* eventQueue() const = 0; | 128 virtual EventQueue* eventQueue() const = 0; |
126 | 129 |
127 protected: | 130 protected: |
128 | 131 |
129 ContextLifecycleNotifier& lifecycleNotifier(); | 132 ContextLifecycleNotifier& lifecycleNotifier(); |
130 | 133 |
134 bool m_scriptEnabled; | |
135 | |
131 private: | 136 private: |
132 friend class DOMTimer; // For installNewTimeout() and removeTimeoutByID() be low. | 137 friend class DOMTimer; // For installNewTimeout() and removeTimeoutByID() be low. |
133 | 138 |
134 bool dispatchErrorEvent(PassRefPtrWillBeRawPtr<ErrorEvent>, AccessControlSta tus); | 139 bool dispatchErrorEvent(PassRefPtrWillBeRawPtr<ErrorEvent>, AccessControlSta tus); |
135 | 140 |
136 virtual void refExecutionContext() = 0; | 141 virtual void refExecutionContext() = 0; |
137 virtual void derefExecutionContext() = 0; | 142 virtual void derefExecutionContext() = 0; |
138 // LifecycleContext implementation. | 143 // LifecycleContext implementation. |
139 | 144 |
140 // Implementation details for DOMTimer. No other classes should call these f unctions. | 145 // Implementation details for DOMTimer. No other classes should call these f unctions. |
(...skipping 18 matching lines...) Expand all Loading... | |
159 | 164 |
160 // The location of this member is important; to make sure contextDestroyed() notification on | 165 // The location of this member is important; to make sure contextDestroyed() notification on |
161 // ExecutionContext's members (notably m_timeouts) is called before they are destructed, | 166 // ExecutionContext's members (notably m_timeouts) is called before they are destructed, |
162 // m_lifecycleNotifer should be placed *after* such members. | 167 // m_lifecycleNotifer should be placed *after* such members. |
163 OwnPtr<ContextLifecycleNotifier> m_lifecycleNotifier; | 168 OwnPtr<ContextLifecycleNotifier> m_lifecycleNotifier; |
164 }; | 169 }; |
165 | 170 |
166 } // namespace WebCore | 171 } // namespace WebCore |
167 | 172 |
168 #endif // ExecutionContext_h | 173 #endif // ExecutionContext_h |
OLD | NEW |