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

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

Issue 2050123002: Remove OwnPtr from Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: First attempt to land. Created 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 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 19 matching lines...) Expand all
30 30
31 #ifndef LocalFileSystem_h 31 #ifndef LocalFileSystem_h
32 #define LocalFileSystem_h 32 #define LocalFileSystem_h
33 33
34 #include "core/workers/WorkerClients.h" 34 #include "core/workers/WorkerClients.h"
35 #include "platform/FileSystemType.h" 35 #include "platform/FileSystemType.h"
36 #include "platform/Supplementable.h" 36 #include "platform/Supplementable.h"
37 #include "platform/heap/Handle.h" 37 #include "platform/heap/Handle.h"
38 #include "wtf/Forward.h" 38 #include "wtf/Forward.h"
39 #include "wtf/Functional.h" 39 #include "wtf/Functional.h"
40 #include "wtf/PassOwnPtr.h" 40 #include <memory>
41 41
42 namespace blink { 42 namespace blink {
43 43
44 class AsyncFileSystemCallbacks; 44 class AsyncFileSystemCallbacks;
45 class CallbackWrapper; 45 class CallbackWrapper;
46 class FileSystemClient; 46 class FileSystemClient;
47 class ExecutionContext; 47 class ExecutionContext;
48 class KURL; 48 class KURL;
49 class LocalFrame; 49 class LocalFrame;
50 class WebFileSystem; 50 class WebFileSystem;
51 51
52 class LocalFileSystem final : public GarbageCollectedFinalized<LocalFileSystem>, public Supplement<LocalFrame>, public Supplement<WorkerClients> { 52 class LocalFileSystem final : public GarbageCollectedFinalized<LocalFileSystem>, public Supplement<LocalFrame>, public Supplement<WorkerClients> {
53 USING_GARBAGE_COLLECTED_MIXIN(LocalFileSystem); 53 USING_GARBAGE_COLLECTED_MIXIN(LocalFileSystem);
54 WTF_MAKE_NONCOPYABLE(LocalFileSystem); 54 WTF_MAKE_NONCOPYABLE(LocalFileSystem);
55 public: 55 public:
56 static LocalFileSystem* create(PassOwnPtr<FileSystemClient>); 56 static LocalFileSystem* create(std::unique_ptr<FileSystemClient>);
57 ~LocalFileSystem(); 57 ~LocalFileSystem();
58 58
59 void resolveURL(ExecutionContext*, const KURL&, PassOwnPtr<AsyncFileSystemCa llbacks>); 59 void resolveURL(ExecutionContext*, const KURL&, std::unique_ptr<AsyncFileSys temCallbacks>);
60 void requestFileSystem(ExecutionContext*, FileSystemType, long long size, Pa ssOwnPtr<AsyncFileSystemCallbacks>); 60 void requestFileSystem(ExecutionContext*, FileSystemType, long long size, st d::unique_ptr<AsyncFileSystemCallbacks>);
61 void deleteFileSystem(ExecutionContext*, FileSystemType, PassOwnPtr<AsyncFil eSystemCallbacks>); 61 void deleteFileSystem(ExecutionContext*, FileSystemType, std::unique_ptr<Asy ncFileSystemCallbacks>);
62 62
63 FileSystemClient* client() const { return m_client.get(); } 63 FileSystemClient* client() const { return m_client.get(); }
64 64
65 static const char* supplementName(); 65 static const char* supplementName();
66 static LocalFileSystem* from(ExecutionContext&); 66 static LocalFileSystem* from(ExecutionContext&);
67 67
68 DEFINE_INLINE_VIRTUAL_TRACE() 68 DEFINE_INLINE_VIRTUAL_TRACE()
69 { 69 {
70 Supplement<LocalFrame>::trace(visitor); 70 Supplement<LocalFrame>::trace(visitor);
71 Supplement<WorkerClients>::trace(visitor); 71 Supplement<WorkerClients>::trace(visitor);
72 } 72 }
73 73
74 private: 74 private:
75 explicit LocalFileSystem(PassOwnPtr<FileSystemClient>); 75 explicit LocalFileSystem(std::unique_ptr<FileSystemClient>);
76 76
77 WebFileSystem* getFileSystem() const; 77 WebFileSystem* getFileSystem() const;
78 void fileSystemNotAvailable(ExecutionContext*, CallbackWrapper*); 78 void fileSystemNotAvailable(ExecutionContext*, CallbackWrapper*);
79 79
80 void requestFileSystemAccessInternal(ExecutionContext*, std::unique_ptr<Same ThreadClosure> allowed, std::unique_ptr<SameThreadClosure> denied); 80 void requestFileSystemAccessInternal(ExecutionContext*, std::unique_ptr<Same ThreadClosure> allowed, std::unique_ptr<SameThreadClosure> denied);
81 void fileSystemNotAllowedInternal(ExecutionContext*, CallbackWrapper*); 81 void fileSystemNotAllowedInternal(ExecutionContext*, CallbackWrapper*);
82 void fileSystemAllowedInternal(ExecutionContext*, FileSystemType, CallbackWr apper*); 82 void fileSystemAllowedInternal(ExecutionContext*, FileSystemType, CallbackWr apper*);
83 void resolveURLInternal(ExecutionContext*, const KURL&, CallbackWrapper*); 83 void resolveURLInternal(ExecutionContext*, const KURL&, CallbackWrapper*);
84 void deleteFileSystemInternal(ExecutionContext*, FileSystemType, CallbackWra pper*); 84 void deleteFileSystemInternal(ExecutionContext*, FileSystemType, CallbackWra pper*);
85 85
86 OwnPtr<FileSystemClient> m_client; 86 std::unique_ptr<FileSystemClient> m_client;
87 }; 87 };
88 88
89 } // namespace blink 89 } // namespace blink
90 90
91 #endif // LocalFileSystem_h 91 #endif // LocalFileSystem_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698