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

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

Issue 256103007: Remove modules/filesystem/DraggedIsolatedFileSystem.h dependency from core/DEPS. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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
« no previous file with comments | « Source/modules/filesystem/DraggedIsolatedFileSystem.h ('k') | Source/web/WebDragData.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 25 matching lines...) Expand all
36 #include "platform/Supplementable.h" 36 #include "platform/Supplementable.h"
37 #include "platform/weborigin/SecurityOrigin.h" 37 #include "platform/weborigin/SecurityOrigin.h"
38 #include "wtf/MainThread.h" 38 #include "wtf/MainThread.h"
39 39
40 namespace WebCore { 40 namespace WebCore {
41 41
42 DraggedIsolatedFileSystem::~DraggedIsolatedFileSystem() 42 DraggedIsolatedFileSystem::~DraggedIsolatedFileSystem()
43 { 43 {
44 } 44 }
45 45
46 DOMFileSystem* DraggedIsolatedFileSystem::getDOMFileSystem(ExecutionContext* exe cutionContext) 46 DOMFileSystem* DraggedIsolatedFileSystem::getDOMFileSystem(DataObject* host, Exe cutionContext* executionContext)
47 { 47 {
48 ASSERT(!m_filesystemId.isEmpty()); 48 DraggedIsolatedFileSystem* draggedIsolatedFileSystem = from(host);
49 if (!m_filesystem) 49 if (!draggedIsolatedFileSystem)
50 m_filesystem = DOMFileSystem::createIsolatedFileSystem(executionContext, m_filesystemId); 50 return 0;
51 return m_filesystem.get(); 51 if (!draggedIsolatedFileSystem->m_filesystem)
52 draggedIsolatedFileSystem->m_filesystem = DOMFileSystem::createIsolatedF ileSystem(executionContext, host->filesystemId());
53 return draggedIsolatedFileSystem->m_filesystem.get();
52 } 54 }
53 55
54 // static 56 // static
55 const char* DraggedIsolatedFileSystem::supplementName() 57 const char* DraggedIsolatedFileSystem::supplementName()
56 { 58 {
57 ASSERT(isMainThread()); 59 ASSERT(isMainThread());
58 return "DraggedIsolatedFileSystem"; 60 return "DraggedIsolatedFileSystem";
59 } 61 }
60 62
61 DraggedIsolatedFileSystem* DraggedIsolatedFileSystem::from(DataObject* dataObjec t) 63 DraggedIsolatedFileSystem* DraggedIsolatedFileSystem::from(DataObject* dataObjec t)
62 { 64 {
63 return static_cast<DraggedIsolatedFileSystem*>(WillBeHeapSupplement<DataObje ct>::from(dataObject, supplementName())); 65 return static_cast<DraggedIsolatedFileSystem*>(WillBeHeapSupplement<DataObje ct>::from(dataObject, supplementName()));
64 } 66 }
65 67
66 DraggedIsolatedFileSystem::DraggedIsolatedFileSystem(const String& filesystemId) 68 DraggedIsolatedFileSystem::DraggedIsolatedFileSystem(DataObject& host, const Str ing& filesystemId)
67 : m_filesystemId(filesystemId)
68 { 69 {
70 host.setFilesystemId(filesystemId);
69 } 71 }
70 72
71 void DraggedIsolatedFileSystem::trace(Visitor* visitor) 73 void DraggedIsolatedFileSystem::trace(Visitor* visitor)
72 { 74 {
73 visitor->trace(m_filesystem); 75 visitor->trace(m_filesystem);
74 } 76 }
75 77
76 } // namespace WebCore 78 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/modules/filesystem/DraggedIsolatedFileSystem.h ('k') | Source/web/WebDragData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698