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

Side by Side Diff: third_party/WebKit/Source/core/dom/ExecutionContext.h

Issue 2847703002: Make ExecutionContext aware about how it can return CoreProbeSink (Closed)
Patch Set: . Created 3 years, 7 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
OLDNEW
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 25 matching lines...) Expand all
36 #include "platform/Supplementable.h" 36 #include "platform/Supplementable.h"
37 #include "platform/heap/Handle.h" 37 #include "platform/heap/Handle.h"
38 #include "platform/loader/fetch/AccessControlStatus.h" 38 #include "platform/loader/fetch/AccessControlStatus.h"
39 #include "platform/weborigin/KURL.h" 39 #include "platform/weborigin/KURL.h"
40 #include "platform/weborigin/ReferrerPolicy.h" 40 #include "platform/weborigin/ReferrerPolicy.h"
41 #include "platform/wtf/Noncopyable.h" 41 #include "platform/wtf/Noncopyable.h"
42 #include "public/platform/WebTraceLocation.h" 42 #include "public/platform/WebTraceLocation.h"
43 43
44 namespace blink { 44 namespace blink {
45 45
46 class SuspendableObject;
47 class ConsoleMessage; 46 class ConsoleMessage;
47 class CoreProbeSink;
48 class DOMTimerCoordinator; 48 class DOMTimerCoordinator;
49 class ErrorEvent; 49 class ErrorEvent;
50 class EventQueue; 50 class EventQueue;
51 class EventTarget; 51 class EventTarget;
52 class ExecutionContextTask; 52 class ExecutionContextTask;
53 class LocalDOMWindow; 53 class LocalDOMWindow;
54 class SuspendableObject;
54 class PublicURLManager; 55 class PublicURLManager;
55 class SecurityOrigin; 56 class SecurityOrigin;
56 class ScriptState; 57 class ScriptState;
57 enum class TaskType : unsigned; 58 enum class TaskType : unsigned;
58 59
59 enum ReasonForCallingCanExecuteScripts { 60 enum ReasonForCallingCanExecuteScripts {
60 kAboutToExecuteScript, 61 kAboutToExecuteScript,
61 kNotAboutToExecuteScript 62 kNotAboutToExecuteScript
62 }; 63 };
63 64
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 // tokens are valid policies. 175 // tokens are valid policies.
175 // 176 //
176 // If |supportLegacyKeywords| is true, then the legacy keywords 177 // If |supportLegacyKeywords| is true, then the legacy keywords
177 // "never", "default", "always", and "origin-when-crossorigin" are 178 // "never", "default", "always", and "origin-when-crossorigin" are
178 // parsed as valid policies. 179 // parsed as valid policies.
179 void ParseAndSetReferrerPolicy(const String& policies, 180 void ParseAndSetReferrerPolicy(const String& policies,
180 bool support_legacy_keywords = false); 181 bool support_legacy_keywords = false);
181 void SetReferrerPolicy(ReferrerPolicy); 182 void SetReferrerPolicy(ReferrerPolicy);
182 virtual ReferrerPolicy GetReferrerPolicy() const { return referrer_policy_; } 183 virtual ReferrerPolicy GetReferrerPolicy() const { return referrer_policy_; }
183 184
185 virtual CoreProbeSink* GetProbeSink() { return nullptr; }
186
184 protected: 187 protected:
185 ExecutionContext(); 188 ExecutionContext();
186 virtual ~ExecutionContext(); 189 virtual ~ExecutionContext();
187 190
188 virtual const KURL& VirtualURL() const = 0; 191 virtual const KURL& VirtualURL() const = 0;
189 virtual KURL VirtualCompleteURL(const String&) const = 0; 192 virtual KURL VirtualCompleteURL(const String&) const = 0;
190 193
191 private: 194 private:
192 bool DispatchErrorEventInternal(ErrorEvent*, AccessControlStatus); 195 bool DispatchErrorEventInternal(ErrorEvent*, AccessControlStatus);
193 196
(...skipping 12 matching lines...) Expand all
206 // |allowWindowInteraction()| and |consumeWindowInteraction()| in order to 209 // |allowWindowInteraction()| and |consumeWindowInteraction()| in order to
207 // increment and decrement the counter. 210 // increment and decrement the counter.
208 int window_interaction_tokens_; 211 int window_interaction_tokens_;
209 212
210 ReferrerPolicy referrer_policy_; 213 ReferrerPolicy referrer_policy_;
211 }; 214 };
212 215
213 } // namespace blink 216 } // namespace blink
214 217
215 #endif // ExecutionContext_h 218 #endif // ExecutionContext_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.cpp ('k') | third_party/WebKit/Source/core/probe/CoreProbes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698