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

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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 // tokens are valid policies. 186 // tokens are valid policies.
186 // 187 //
187 // If |supportLegacyKeywords| is true, then the legacy keywords 188 // If |supportLegacyKeywords| is true, then the legacy keywords
188 // "never", "default", "always", and "origin-when-crossorigin" are 189 // "never", "default", "always", and "origin-when-crossorigin" are
189 // parsed as valid policies. 190 // parsed as valid policies.
190 void ParseAndSetReferrerPolicy(const String& policies, 191 void ParseAndSetReferrerPolicy(const String& policies,
191 bool support_legacy_keywords = false); 192 bool support_legacy_keywords = false);
192 void SetReferrerPolicy(ReferrerPolicy); 193 void SetReferrerPolicy(ReferrerPolicy);
193 virtual ReferrerPolicy GetReferrerPolicy() const { return referrer_policy_; } 194 virtual ReferrerPolicy GetReferrerPolicy() const { return referrer_policy_; }
194 195
196 virtual CoreProbeSink* GetInstrumentingAgents() { return nullptr; }
dgozman 2017/04/28 00:06:38 Let's call this GetProbeSink. @alph: we should ren
kinuko 2017/04/28 03:16:26 Done.
197
195 protected: 198 protected:
196 ExecutionContext(); 199 ExecutionContext();
197 virtual ~ExecutionContext(); 200 virtual ~ExecutionContext();
198 201
199 virtual const KURL& VirtualURL() const = 0; 202 virtual const KURL& VirtualURL() const = 0;
200 virtual KURL VirtualCompleteURL(const String&) const = 0; 203 virtual KURL VirtualCompleteURL(const String&) const = 0;
201 204
202 private: 205 private:
203 bool DispatchErrorEventInternal(ErrorEvent*, AccessControlStatus); 206 bool DispatchErrorEventInternal(ErrorEvent*, AccessControlStatus);
204 207
(...skipping 12 matching lines...) Expand all
217 // |allowWindowInteraction()| and |consumeWindowInteraction()| in order to 220 // |allowWindowInteraction()| and |consumeWindowInteraction()| in order to
218 // increment and decrement the counter. 221 // increment and decrement the counter.
219 int window_interaction_tokens_; 222 int window_interaction_tokens_;
220 223
221 ReferrerPolicy referrer_policy_; 224 ReferrerPolicy referrer_policy_;
222 }; 225 };
223 226
224 } // namespace blink 227 } // namespace blink
225 228
226 #endif // ExecutionContext_h 229 #endif // ExecutionContext_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698