OLD | NEW |
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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 if (it != dragged_isolated_file_system->filesystems_.end()) | 51 if (it != dragged_isolated_file_system->filesystems_.end()) |
52 return it->value; | 52 return it->value; |
53 return dragged_isolated_file_system->filesystems_ | 53 return dragged_isolated_file_system->filesystems_ |
54 .insert(file_system_id, DOMFileSystem::CreateIsolatedFileSystem( | 54 .insert(file_system_id, DOMFileSystem::CreateIsolatedFileSystem( |
55 execution_context, file_system_id)) | 55 execution_context, file_system_id)) |
56 .stored_value->value; | 56 .stored_value->value; |
57 } | 57 } |
58 | 58 |
59 // static | 59 // static |
60 const char* DraggedIsolatedFileSystemImpl::SupplementName() { | 60 const char* DraggedIsolatedFileSystemImpl::SupplementName() { |
61 ASSERT(IsMainThread()); | 61 DCHECK(IsMainThread()); |
62 return "DraggedIsolatedFileSystemImpl"; | 62 return "DraggedIsolatedFileSystemImpl"; |
63 } | 63 } |
64 | 64 |
65 DraggedIsolatedFileSystemImpl* DraggedIsolatedFileSystemImpl::From( | 65 DraggedIsolatedFileSystemImpl* DraggedIsolatedFileSystemImpl::From( |
66 DataObject* data_object) { | 66 DataObject* data_object) { |
67 return static_cast<DraggedIsolatedFileSystemImpl*>( | 67 return static_cast<DraggedIsolatedFileSystemImpl*>( |
68 Supplement<DataObject>::From(data_object, SupplementName())); | 68 Supplement<DataObject>::From(data_object, SupplementName())); |
69 } | 69 } |
70 | 70 |
71 DEFINE_TRACE(DraggedIsolatedFileSystemImpl) { | 71 DEFINE_TRACE(DraggedIsolatedFileSystemImpl) { |
72 visitor->Trace(filesystems_); | 72 visitor->Trace(filesystems_); |
73 Supplement<DataObject>::Trace(visitor); | 73 Supplement<DataObject>::Trace(visitor); |
74 } | 74 } |
75 | 75 |
76 void DraggedIsolatedFileSystemImpl::PrepareForDataObject( | 76 void DraggedIsolatedFileSystemImpl::PrepareForDataObject( |
77 DataObject* data_object) { | 77 DataObject* data_object) { |
78 DraggedIsolatedFileSystemImpl* file_system = | 78 DraggedIsolatedFileSystemImpl* file_system = |
79 new DraggedIsolatedFileSystemImpl(); | 79 new DraggedIsolatedFileSystemImpl(); |
80 DraggedIsolatedFileSystemImpl::ProvideTo( | 80 DraggedIsolatedFileSystemImpl::ProvideTo( |
81 *data_object, DraggedIsolatedFileSystemImpl::SupplementName(), | 81 *data_object, DraggedIsolatedFileSystemImpl::SupplementName(), |
82 file_system); | 82 file_system); |
83 } | 83 } |
84 | 84 |
85 } // namespace blink | 85 } // namespace blink |
OLD | NEW |