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

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

Issue 929953002: CachedMetadata support for ServiceWorker script. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: incorporated vivekg's comment Created 5 years, 10 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 // WorkerGlobalScope 92 // WorkerGlobalScope
93 WorkerGlobalScope* self() { return this; } 93 WorkerGlobalScope* self() { return this; }
94 WorkerConsole* console(); 94 WorkerConsole* console();
95 WorkerLocation* location() const; 95 WorkerLocation* location() const;
96 void close(); 96 void close();
97 97
98 DEFINE_ATTRIBUTE_EVENT_LISTENER(error); 98 DEFINE_ATTRIBUTE_EVENT_LISTENER(error);
99 99
100 // WorkerUtils 100 // WorkerUtils
101 virtual void importScripts(const Vector<String>& urls, ExceptionState&); 101 virtual void importScripts(const Vector<String>& urls, ExceptionState&);
102 virtual void setCachedMetadata(const KURL&, const char* data, size_t size) { }
103 virtual void clearCachedMetadata(const KURL&) { }
kinuko 2015/02/16 14:18:38 Hmm. We modify all the WorkerThreadStartupData, W
horo 2015/02/16 16:20:12 I want to use WorkerScriptCachedMetadataHandler in
kinuko 2015/02/17 02:32:31 How do you plan to get the cached metadata for imp
horo 2015/02/17 03:32:18 I will create WorkerScriptCachedMetadataHandler us
kinuko 2015/02/17 05:19:24 Thanks. So having the client hold cached metadata
102 WorkerNavigator* navigator() const; 104 WorkerNavigator* navigator() const;
103 105
104 // ExecutionContextClient 106 // ExecutionContextClient
105 virtual WorkerEventQueue* eventQueue() const override final; 107 virtual WorkerEventQueue* eventQueue() const override final;
106 virtual SecurityContext& securityContext() override final { return *this; } 108 virtual SecurityContext& securityContext() override final { return *this; }
107 109
108 virtual bool isContextThread() const override final; 110 virtual bool isContextThread() const override final;
109 virtual bool isJSExecutionForbidden() const override final; 111 virtual bool isJSExecutionForbidden() const override final;
110 112
111 virtual double timerAlignmentInterval() const override final; 113 virtual double timerAlignmentInterval() const override final;
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 181
180 unsigned long m_workerExceptionUniqueIdentifier; 182 unsigned long m_workerExceptionUniqueIdentifier;
181 WillBeHeapHashMap<unsigned long, RefPtrWillBeMember<ConsoleMessage>> m_pendi ngMessages; 183 WillBeHeapHashMap<unsigned long, RefPtrWillBeMember<ConsoleMessage>> m_pendi ngMessages;
182 }; 184 };
183 185
184 DEFINE_TYPE_CASTS(WorkerGlobalScope, ExecutionContext, context, context->isWorke rGlobalScope(), context.isWorkerGlobalScope()); 186 DEFINE_TYPE_CASTS(WorkerGlobalScope, ExecutionContext, context, context->isWorke rGlobalScope(), context.isWorkerGlobalScope());
185 187
186 } // namespace blink 188 } // namespace blink
187 189
188 #endif // WorkerGlobalScope_h 190 #endif // WorkerGlobalScope_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698