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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 | 57 |
58 class ExecutionContext | 58 class ExecutionContext |
59 : public LifecycleContext<ExecutionContext> | 59 : public LifecycleContext<ExecutionContext> |
60 , public WillBeHeapSupplementable<ExecutionContext> { | 60 , public WillBeHeapSupplementable<ExecutionContext> { |
61 public: | 61 public: |
62 virtual void trace(Visitor*) OVERRIDE; | 62 virtual void trace(Visitor*) OVERRIDE; |
63 | 63 |
64 // Delegating to ExecutionContextClient | 64 // Delegating to ExecutionContextClient |
65 bool isDocument() const { return m_client && m_client->isDocument(); } | 65 bool isDocument() const { return m_client && m_client->isDocument(); } |
66 bool isWorkerGlobalScope() const { return m_client && m_client->isWorkerGlob
alScope(); } | 66 bool isWorkerGlobalScope() const { return m_client && m_client->isWorkerGlob
alScope(); } |
67 bool isDedicatedWorkerGlobalScope() const { return m_client && m_client->isD
edicatedWorkerGlobalScope(); } | |
68 bool isSharedWorkerGlobalScope() const { return m_client && m_client->isShar
edWorkerGlobalScope(); } | |
69 bool isServiceWorkerGlobalScope() const { return m_client && m_client->isSer
viceWorkerGlobalScope(); } | |
70 bool isJSExecutionForbidden() { return m_client && m_client->isJSExecutionFo
rbidden(); } | 67 bool isJSExecutionForbidden() { return m_client && m_client->isJSExecutionFo
rbidden(); } |
71 SecurityOrigin* securityOrigin() const; | 68 SecurityOrigin* securityOrigin() const; |
72 ContentSecurityPolicy* contentSecurityPolicy() const; | 69 ContentSecurityPolicy* contentSecurityPolicy() const; |
73 const KURL& url() const; | 70 const KURL& url() const; |
74 KURL completeURL(const String& url) const; | 71 KURL completeURL(const String& url) const; |
75 void disableEval(const String& errorMessage); | 72 void disableEval(const String& errorMessage); |
76 LocalDOMWindow* executingWindow() const; | 73 LocalDOMWindow* executingWindow() const; |
77 String userAgent(const KURL&) const; | 74 String userAgent(const KURL&) const; |
78 void postTask(PassOwnPtr<ExecutionContextTask>); | 75 void postTask(PassOwnPtr<ExecutionContextTask>); |
79 double timerAlignmentInterval() const; | 76 double timerAlignmentInterval() const; |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 | 169 |
173 // The location of this member is important; to make sure contextDestroyed()
notification on | 170 // The location of this member is important; to make sure contextDestroyed()
notification on |
174 // ExecutionContext's members (notably m_timeouts) is called before they are
destructed, | 171 // ExecutionContext's members (notably m_timeouts) is called before they are
destructed, |
175 // m_lifecycleNotifer should be placed *after* such members. | 172 // m_lifecycleNotifer should be placed *after* such members. |
176 OwnPtr<ContextLifecycleNotifier> m_lifecycleNotifier; | 173 OwnPtr<ContextLifecycleNotifier> m_lifecycleNotifier; |
177 }; | 174 }; |
178 | 175 |
179 } // namespace blink | 176 } // namespace blink |
180 | 177 |
181 #endif // ExecutionContext_h | 178 #endif // ExecutionContext_h |
OLD | NEW |