| 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 : public ContextLifecycleNotifier, public WillBeHeapSupplementable<Execution
Context> { | 56 : public ContextLifecycleNotifier, public WillBeHeapSupplementable<Execution
Context> { |
| 57 public: | 57 public: |
| 58 DECLARE_VIRTUAL_TRACE(); | 58 DECLARE_VIRTUAL_TRACE(); |
| 59 | 59 |
| 60 virtual bool isDocument() const { return false; } | 60 virtual bool isDocument() const { return false; } |
| 61 virtual bool isWorkerGlobalScope() const { return false; } | 61 virtual bool isWorkerGlobalScope() const { return false; } |
| 62 virtual bool isDedicatedWorkerGlobalScope() const { return false; } | 62 virtual bool isDedicatedWorkerGlobalScope() const { return false; } |
| 63 virtual bool isSharedWorkerGlobalScope() const { return false; } | 63 virtual bool isSharedWorkerGlobalScope() const { return false; } |
| 64 virtual bool isServiceWorkerGlobalScope() const { return false; } | 64 virtual bool isServiceWorkerGlobalScope() const { return false; } |
| 65 virtual bool isJSExecutionForbidden() const { return false; } | 65 virtual bool isJSExecutionForbidden() const { return false; } |
| 66 |
| 67 virtual bool isContextThread() const { return true; } |
| 68 |
| 66 SecurityOrigin* securityOrigin(); | 69 SecurityOrigin* securityOrigin(); |
| 67 ContentSecurityPolicy* contentSecurityPolicy(); | 70 ContentSecurityPolicy* contentSecurityPolicy(); |
| 68 const KURL& url() const; | 71 const KURL& url() const; |
| 69 KURL completeURL(const String& url) const; | 72 KURL completeURL(const String& url) const; |
| 70 virtual void disableEval(const String& errorMessage) = 0; | 73 virtual void disableEval(const String& errorMessage) = 0; |
| 71 virtual LocalDOMWindow* executingWindow() { return 0; } | 74 virtual LocalDOMWindow* executingWindow() { return 0; } |
| 72 virtual String userAgent(const KURL&) const = 0; | 75 virtual String userAgent(const KURL&) const = 0; |
| 73 virtual void postTask(const WebTraceLocation&, PassOwnPtr<ExecutionContextTa
sk>) = 0; // Executes the task on context's thread asynchronously. | 76 virtual void postTask(const WebTraceLocation&, PassOwnPtr<ExecutionContextTa
sk>) = 0; // Executes the task on context's thread asynchronously. |
| 74 virtual double timerAlignmentInterval() const = 0; | 77 virtual double timerAlignmentInterval() const = 0; |
| 75 | 78 |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 // Counter that keeps track of how many window interaction calls are allowed | 163 // Counter that keeps track of how many window interaction calls are allowed |
| 161 // for this ExecutionContext. Callers are expected to call | 164 // for this ExecutionContext. Callers are expected to call |
| 162 // |allowWindowInteraction()| and |consumeWindowInteraction()| in order to | 165 // |allowWindowInteraction()| and |consumeWindowInteraction()| in order to |
| 163 // increment and decrement the counter. | 166 // increment and decrement the counter. |
| 164 int m_windowInteractionTokens; | 167 int m_windowInteractionTokens; |
| 165 }; | 168 }; |
| 166 | 169 |
| 167 } // namespace blink | 170 } // namespace blink |
| 168 | 171 |
| 169 #endif // ExecutionContext_h | 172 #endif // ExecutionContext_h |
| OLD | NEW |