Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(211)

Side by Side Diff: Source/core/dom/ExecutionContextClient.h

Issue 332993002: Replace ContentSecurityPolicy::client() with a method returning an ExecutionContext (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/dom/ExecutionContext.cpp ('k') | Source/core/dom/MainThreadTaskRunnerTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « Source/core/dom/ExecutionContext.cpp ('k') | Source/core/dom/MainThreadTaskRunnerTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698