| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 * * Neither the name of Google Inc. nor the names of its | 10 * * Neither the name of Google Inc. nor the names of its |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 public: | 49 public: |
| 50 virtual void postTask(PassOwnPtr<ExecutionContextTask>) = 0; // Executes the
task on context's thread asynchronously. | 50 virtual void postTask(PassOwnPtr<ExecutionContextTask>) = 0; // Executes the
task on context's thread asynchronously. |
| 51 | 51 |
| 52 virtual bool isDocument() const { return false; } | 52 virtual bool isDocument() const { return false; } |
| 53 virtual bool isWorkerGlobalScope() const { return false; } | 53 virtual bool isWorkerGlobalScope() const { return false; } |
| 54 virtual bool isJSExecutionForbidden() const = 0; | 54 virtual bool isJSExecutionForbidden() const = 0; |
| 55 virtual DOMWindow* executingWindow() { return 0; } | 55 virtual DOMWindow* executingWindow() { return 0; } |
| 56 virtual String userAgent(const KURL&) const = 0; | 56 virtual String userAgent(const KURL&) const = 0; |
| 57 virtual void disableEval(const String& errorMessage) = 0; | 57 virtual void disableEval(const String& errorMessage) = 0; |
| 58 virtual SecurityContext& securityContext() = 0; | 58 virtual SecurityContext& securityContext() = 0; |
| 59 virtual const KURL& virtualURL() const = 0; | |
| 60 virtual KURL virtualCompleteURL(const String&) const = 0; | |
| 61 virtual void addMessage(MessageSource, MessageLevel, const String& message,
const String& sourceURL, unsigned lineNumber, ScriptState*) = 0; | 59 virtual void addMessage(MessageSource, MessageLevel, const String& message,
const String& sourceURL, unsigned lineNumber, ScriptState*) = 0; |
| 62 virtual void reportBlockedScriptExecutionToInspector(const String& directive
Text) = 0; | |
| 63 virtual EventTarget* errorEventTarget() = 0; | 60 virtual EventTarget* errorEventTarget() = 0; |
| 64 virtual void logExceptionToConsole(const String& errorMessage, const String&
sourceURL, int lineNumber, int columnNumber, PassRefPtrWillBeRawPtr<ScriptCallS
tack>) = 0; | 61 virtual void logExceptionToConsole(const String& errorMessage, const String&
sourceURL, int lineNumber, int columnNumber, PassRefPtrWillBeRawPtr<ScriptCallS
tack>) = 0; |
| 65 virtual double timerAlignmentInterval() const = 0; | 62 virtual double timerAlignmentInterval() const = 0; |
| 66 virtual void didUpdateSecurityOrigin() = 0; | 63 virtual void didUpdateSecurityOrigin() = 0; |
| 67 | 64 |
| 68 virtual void tasksWereSuspended() { } | 65 virtual void tasksWereSuspended() { } |
| 69 virtual void tasksWereResumed() { } | 66 virtual void tasksWereResumed() { } |
| 70 | 67 |
| 71 void addConsoleMessage(MessageSource source, MessageLevel level, const Strin
g& message, const String& sourceURL, unsigned lineNumber) { addMessage(source, l
evel, message, sourceURL, lineNumber, 0); } | 68 void addConsoleMessage(MessageSource source, MessageLevel level, const Strin
g& message, const String& sourceURL, unsigned lineNumber) { addMessage(source, l
evel, message, sourceURL, lineNumber, 0); } |
| 72 void addConsoleMessage(MessageSource source, MessageLevel level, const Strin
g& message, ScriptState* state = 0) { addMessage(source, level, message, String(
), 0, state); } | 69 void addConsoleMessage(MessageSource source, MessageLevel level, const Strin
g& message, ScriptState* state = 0) { addMessage(source, level, message, String(
), 0, state); } |
| 73 KURL contextURL() const { return virtualURL(); } | |
| 74 KURL contextCompleteURL(const String& url) const { return virtualCompleteURL
(url); } | |
| 75 | 70 |
| 76 protected: | 71 protected: |
| 77 virtual ~ExecutionContextClient() { } | 72 virtual ~ExecutionContextClient() { } |
| 78 | 73 |
| 79 }; | 74 }; |
| 80 | 75 |
| 81 | 76 |
| 82 } // namespace | 77 } // namespace |
| 83 | 78 |
| 84 #endif | 79 #endif |
| OLD | NEW |