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

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

Issue 640303002: Enable Oilpan for core/clipboard/ (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: remove some slightly pointy edges Created 5 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) 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 21 matching lines...) Expand all
32 #include "modules/filesystem/DraggedIsolatedFileSystemImpl.h" 32 #include "modules/filesystem/DraggedIsolatedFileSystemImpl.h"
33 33
34 #include "core/dom/ExecutionContext.h" 34 #include "core/dom/ExecutionContext.h"
35 #include "modules/filesystem/DOMFileSystem.h" 35 #include "modules/filesystem/DOMFileSystem.h"
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 blink { 40 namespace blink {
41 41
42 DraggedIsolatedFileSystemImpl::~DraggedIsolatedFileSystemImpl()
43 {
44 }
45
46 DOMFileSystem* DraggedIsolatedFileSystemImpl::getDOMFileSystem(DataObject* host, ExecutionContext* executionContext) 42 DOMFileSystem* DraggedIsolatedFileSystemImpl::getDOMFileSystem(DataObject* host, ExecutionContext* executionContext)
47 { 43 {
48 DraggedIsolatedFileSystemImpl* draggedIsolatedFileSystem = from(host); 44 DraggedIsolatedFileSystemImpl* draggedIsolatedFileSystem = from(host);
49 if (!draggedIsolatedFileSystem) 45 if (!draggedIsolatedFileSystem)
50 return 0; 46 return 0;
51 if (!draggedIsolatedFileSystem->m_filesystem) 47 if (!draggedIsolatedFileSystem->m_filesystem)
52 draggedIsolatedFileSystem->m_filesystem = DOMFileSystem::createIsolatedF ileSystem(executionContext, host->filesystemId()); 48 draggedIsolatedFileSystem->m_filesystem = DOMFileSystem::createIsolatedF ileSystem(executionContext, host->filesystemId());
53 return draggedIsolatedFileSystem->m_filesystem.get(); 49 return draggedIsolatedFileSystem->m_filesystem.get();
54 } 50 }
55 51
56 // static 52 // static
57 const char* DraggedIsolatedFileSystemImpl::supplementName() 53 const char* DraggedIsolatedFileSystemImpl::supplementName()
58 { 54 {
59 ASSERT(isMainThread()); 55 ASSERT(isMainThread());
60 return "DraggedIsolatedFileSystemImpl"; 56 return "DraggedIsolatedFileSystemImpl";
61 } 57 }
62 58
63 DraggedIsolatedFileSystemImpl* DraggedIsolatedFileSystemImpl::from(DataObject* d ataObject) 59 DraggedIsolatedFileSystemImpl* DraggedIsolatedFileSystemImpl::from(DataObject* d ataObject)
64 { 60 {
65 return static_cast<DraggedIsolatedFileSystemImpl*>(WillBeHeapSupplement<Data Object>::from(dataObject, supplementName())); 61 return static_cast<DraggedIsolatedFileSystemImpl*>(HeapSupplement<DataObject >::from(dataObject, supplementName()));
66 } 62 }
67 63
68 DraggedIsolatedFileSystemImpl::DraggedIsolatedFileSystemImpl(DataObject& host, c onst String& filesystemId) 64 DraggedIsolatedFileSystemImpl::DraggedIsolatedFileSystemImpl(DataObject& host, c onst String& filesystemId)
69 { 65 {
70 host.setFilesystemId(filesystemId); 66 host.setFilesystemId(filesystemId);
71 } 67 }
72 68
73 DEFINE_TRACE(DraggedIsolatedFileSystemImpl) 69 DEFINE_TRACE(DraggedIsolatedFileSystemImpl)
74 { 70 {
75 visitor->trace(m_filesystem); 71 visitor->trace(m_filesystem);
76 WillBeHeapSupplement<DataObject>::trace(visitor); 72 HeapSupplement<DataObject>::trace(visitor);
77 } 73 }
78 74
79 void DraggedIsolatedFileSystemImpl::prepareForDataObject(DataObject* dataObject, const String& filesystemId) 75 void DraggedIsolatedFileSystemImpl::prepareForDataObject(DataObject* dataObject, const String& filesystemId)
80 { 76 {
81 OwnPtrWillBeRawPtr<DraggedIsolatedFileSystemImpl> fileSystem = create(*dataO bject, filesystemId); 77 DraggedIsolatedFileSystemImpl* fileSystem = create(*dataObject, filesystemId );
82 DraggedIsolatedFileSystemImpl::provideTo(*dataObject, DraggedIsolatedFileSys temImpl::supplementName(), fileSystem.release()); 78 DraggedIsolatedFileSystemImpl::provideTo(*dataObject, DraggedIsolatedFileSys temImpl::supplementName(), fileSystem);
83 } 79 }
84 80
85 } // namespace blink 81 } // namespace blink
OLDNEW
« no previous file with comments | « Source/modules/filesystem/DraggedIsolatedFileSystemImpl.h ('k') | Source/web/WebDragDataTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698