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

Side by Side Diff: third_party/WebKit/Source/core/workers/WorkerGlobalScope.h

Issue 2838603002: Added [SecureContext] to the subtle attribute (Closed)
Patch Set: Magic test starts doing differnt things out of the blue. Need to handle this properly. Avada Kedavr… 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, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2008, 2009 Apple 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 92
93 void RegisterEventListener(V8AbstractEventListener*); 93 void RegisterEventListener(V8AbstractEventListener*);
94 void DeregisterEventListener(V8AbstractEventListener*); 94 void DeregisterEventListener(V8AbstractEventListener*);
95 95
96 // WorkerGlobalScope 96 // WorkerGlobalScope
97 WorkerGlobalScope* self() { return this; } 97 WorkerGlobalScope* self() { return this; }
98 WorkerLocation* location() const; 98 WorkerLocation* location() const;
99 WorkerNavigator* navigator() const; 99 WorkerNavigator* navigator() const;
100 void close(); 100 void close();
101 bool isSecureContextForBindings() const { 101 bool isSecureContextForBindings() const {
102 return ExecutionContext::IsSecureContext(kStandardSecureContextCheck); 102 return ExecutionContext::IsSecureContext();
103 } 103 }
104 104
105 String origin() const; 105 String origin() const;
106 106
107 DEFINE_ATTRIBUTE_EVENT_LISTENER(error); 107 DEFINE_ATTRIBUTE_EVENT_LISTENER(error);
108 DEFINE_ATTRIBUTE_EVENT_LISTENER(rejectionhandled); 108 DEFINE_ATTRIBUTE_EVENT_LISTENER(rejectionhandled);
109 DEFINE_ATTRIBUTE_EVENT_LISTENER(unhandledrejection); 109 DEFINE_ATTRIBUTE_EVENT_LISTENER(unhandledrejection);
110 110
111 // WorkerUtils 111 // WorkerUtils
112 virtual void importScripts(const Vector<String>& urls, ExceptionState&); 112 virtual void importScripts(const Vector<String>& urls, ExceptionState&);
(...skipping 13 matching lines...) Expand all
126 bool IsWorkerGlobalScope() const final { return true; } 126 bool IsWorkerGlobalScope() const final { return true; }
127 bool IsJSExecutionForbidden() const final; 127 bool IsJSExecutionForbidden() const final;
128 bool IsContextThread() const final; 128 bool IsContextThread() const final;
129 void DisableEval(const String& error_message) final; 129 void DisableEval(const String& error_message) final;
130 String UserAgent() const final { return user_agent_; } 130 String UserAgent() const final { return user_agent_; }
131 131
132 DOMTimerCoordinator* Timers() final { return &timers_; } 132 DOMTimerCoordinator* Timers() final { return &timers_; }
133 SecurityContext& GetSecurityContext() final { return *this; } 133 SecurityContext& GetSecurityContext() final { return *this; }
134 void AddConsoleMessage(ConsoleMessage*) final; 134 void AddConsoleMessage(ConsoleMessage*) final;
135 WorkerEventQueue* GetEventQueue() const final; 135 WorkerEventQueue* GetEventQueue() const final;
136 bool IsSecureContext( 136 bool IsSecureContext(String& error_message) const override;
137 String& error_message,
138 const SecureContextCheck = kStandardSecureContextCheck) const override;
139 137
140 // EventTarget 138 // EventTarget
141 ExecutionContext* GetExecutionContext() const final; 139 ExecutionContext* GetExecutionContext() const final;
142 140
143 // WorkerOrWorkletGlobalScope 141 // WorkerOrWorkletGlobalScope
144 ScriptWrappable* GetScriptWrappable() const final { 142 ScriptWrappable* GetScriptWrappable() const final {
145 return const_cast<WorkerGlobalScope*>(this); 143 return const_cast<WorkerGlobalScope*>(this);
146 } 144 }
147 145
148 double TimeOrigin() const { return time_origin_; } 146 double TimeOrigin() const { return time_origin_; }
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 216
219 DEFINE_TYPE_CASTS(WorkerGlobalScope, 217 DEFINE_TYPE_CASTS(WorkerGlobalScope,
220 ExecutionContext, 218 ExecutionContext,
221 context, 219 context,
222 context->IsWorkerGlobalScope(), 220 context->IsWorkerGlobalScope(),
223 context.IsWorkerGlobalScope()); 221 context.IsWorkerGlobalScope());
224 222
225 } // namespace blink 223 } // namespace blink
226 224
227 #endif // WorkerGlobalScope_h 225 #endif // WorkerGlobalScope_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698