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

Side by Side Diff: third_party/WebKit/Source/modules/filesystem/LocalFileSystem.cpp

Issue 1846913009: HeapSupplements are now just Supplements. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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) 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 } 197 }
198 198
199 const char* LocalFileSystem::supplementName() 199 const char* LocalFileSystem::supplementName()
200 { 200 {
201 return "LocalFileSystem"; 201 return "LocalFileSystem";
202 } 202 }
203 203
204 LocalFileSystem* LocalFileSystem::from(ExecutionContext& context) 204 LocalFileSystem* LocalFileSystem::from(ExecutionContext& context)
205 { 205 {
206 if (context.isDocument()) 206 if (context.isDocument())
207 return static_cast<LocalFileSystem*>(HeapSupplement<LocalFrame>::from(to Document(context).frame(), supplementName())); 207 return static_cast<LocalFileSystem*>(Supplement<LocalFrame>::from(toDocu ment(context).frame(), supplementName()));
208 208
209 WorkerClients* clients = toWorkerGlobalScope(context).clients(); 209 WorkerClients* clients = toWorkerGlobalScope(context).clients();
210 ASSERT(clients); 210 ASSERT(clients);
211 return static_cast<LocalFileSystem*>(HeapSupplement<WorkerClients>::from(cli ents, supplementName())); 211 return static_cast<LocalFileSystem*>(Supplement<WorkerClients>::from(clients , supplementName()));
212 } 212 }
213 213
214 void provideLocalFileSystemTo(LocalFrame& frame, PassOwnPtr<FileSystemClient> cl ient) 214 void provideLocalFileSystemTo(LocalFrame& frame, PassOwnPtr<FileSystemClient> cl ient)
215 { 215 {
216 frame.provideSupplement(LocalFileSystem::supplementName(), LocalFileSystem:: create(client)); 216 frame.provideSupplement(LocalFileSystem::supplementName(), LocalFileSystem:: create(client));
217 } 217 }
218 218
219 void provideLocalFileSystemToWorker(WorkerClients* clients, PassOwnPtr<FileSyste mClient> client) 219 void provideLocalFileSystemToWorker(WorkerClients* clients, PassOwnPtr<FileSyste mClient> client)
220 { 220 {
221 clients->provideSupplement(LocalFileSystem::supplementName(), LocalFileSyste m::create(client)); 221 clients->provideSupplement(LocalFileSystem::supplementName(), LocalFileSyste m::create(client));
222 } 222 }
223 223
224 } // namespace blink 224 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698