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

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

Issue 1164753004: Tidy up CompositorWorkerManager unit tests. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebased Created 5 years, 6 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 | Annotate | Revision Log
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 199
200 const char* LocalFileSystem::supplementName() 200 const char* LocalFileSystem::supplementName()
201 { 201 {
202 return "LocalFileSystem"; 202 return "LocalFileSystem";
203 } 203 }
204 204
205 LocalFileSystem* LocalFileSystem::from(ExecutionContext& context) 205 LocalFileSystem* LocalFileSystem::from(ExecutionContext& context)
206 { 206 {
207 if (context.isDocument()) { 207 if (context.isDocument())
208 return static_cast<LocalFileSystem*>(WillBeHeapSupplement<LocalFrame>::f rom(toDocument(context).frame(), supplementName())); 208 return static_cast<LocalFileSystem*>(WillBeHeapSupplement<LocalFrame>::f rom(toDocument(context).frame(), supplementName()));
209 } 209
210 ASSERT(context.isWorkerGlobalScope()); 210 WorkerClients* clients = toWorkerGlobalScope(context).clients();
211 return static_cast<LocalFileSystem*>(WillBeHeapSupplement<WorkerClients>::fr om(toWorkerGlobalScope(context).clients(), supplementName())); 211 ASSERT(clients);
212 return static_cast<LocalFileSystem*>(WillBeHeapSupplement<WorkerClients>::fr om(clients, supplementName()));
212 } 213 }
213 214
214 void provideLocalFileSystemTo(LocalFrame& frame, PassOwnPtr<FileSystemClient> cl ient) 215 void provideLocalFileSystemTo(LocalFrame& frame, PassOwnPtr<FileSystemClient> cl ient)
215 { 216 {
216 frame.provideSupplement(LocalFileSystem::supplementName(), LocalFileSystem:: create(client)); 217 frame.provideSupplement(LocalFileSystem::supplementName(), LocalFileSystem:: create(client));
217 } 218 }
218 219
219 void provideLocalFileSystemToWorker(WorkerClients* clients, PassOwnPtr<FileSyste mClient> client) 220 void provideLocalFileSystemToWorker(WorkerClients* clients, PassOwnPtr<FileSyste mClient> client)
220 { 221 {
221 clients->provideSupplement(LocalFileSystem::supplementName(), LocalFileSyste m::create(client)); 222 clients->provideSupplement(LocalFileSystem::supplementName(), LocalFileSyste m::create(client));
222 } 223 }
223 224
224 } // namespace blink 225 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698