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

Side by Side Diff: Source/modules/fetch/CompositeDataConsumerHandle.h

Issue 1222663002: Make CompositeDataConsumerHandle non-copyable to pass compilation (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 5 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CompositeDataConsumerHandle_h 5 #ifndef CompositeDataConsumerHandle_h
6 #define CompositeDataConsumerHandle_h 6 #define CompositeDataConsumerHandle_h
7 7
8 #include "modules/ModulesExport.h" 8 #include "modules/ModulesExport.h"
9 #include "public/platform/WebDataConsumerHandle.h" 9 #include "public/platform/WebDataConsumerHandle.h"
10 #include "wtf/OwnPtr.h" 10 #include "wtf/OwnPtr.h"
11 #include "wtf/PassOwnPtr.h" 11 #include "wtf/PassOwnPtr.h"
12 #include "wtf/RefPtr.h" 12 #include "wtf/RefPtr.h"
13 13
14 namespace blink { 14 namespace blink {
15 15
16 // This is a utility class to construct a composite data consumer handle. It 16 // This is a utility class to construct a composite data consumer handle. It
17 // owns a web data consumer handle and delegates methods. A user can update 17 // owns a web data consumer handle and delegates methods. A user can update
18 // the handle by using |update| method. 18 // the handle by using |update| method.
19 class MODULES_EXPORT CompositeDataConsumerHandle final : public WebDataConsumerH andle { 19 class MODULES_EXPORT CompositeDataConsumerHandle final : public WebDataConsumerH andle {
20 WTF_MAKE_NONCOPYABLE(CompositeDataConsumerHandle);
20 public: 21 public:
21 // |handle| must not be null and must not be locked. 22 // |handle| must not be null and must not be locked.
22 static PassOwnPtr<CompositeDataConsumerHandle> create(PassOwnPtr<WebDataCons umerHandle> handle) 23 static PassOwnPtr<CompositeDataConsumerHandle> create(PassOwnPtr<WebDataCons umerHandle> handle)
23 { 24 {
24 ASSERT(handle); 25 ASSERT(handle);
25 return adoptPtr(new CompositeDataConsumerHandle(handle)); 26 return adoptPtr(new CompositeDataConsumerHandle(handle));
26 } 27 }
27 ~CompositeDataConsumerHandle() override; 28 ~CompositeDataConsumerHandle() override;
28 29
29 // This function should be called on the thread on which this object 30 // This function should be called on the thread on which this object
30 // was created. |handle| must not be null and must not be locked. 31 // was created. |handle| must not be null and must not be locked.
31 void update(PassOwnPtr<WebDataConsumerHandle> /* handle */); 32 void update(PassOwnPtr<WebDataConsumerHandle> /* handle */);
32 33
33 private: 34 private:
34 class Context; 35 class Context;
35 class ReaderImpl; 36 class ReaderImpl;
36 Reader* obtainReaderInternal(Client*) override; 37 Reader* obtainReaderInternal(Client*) override;
37 38
38 const char* debugName() const override { return "CompositeDataConsumerHandle "; } 39 const char* debugName() const override { return "CompositeDataConsumerHandle "; }
39 40
40 explicit CompositeDataConsumerHandle(PassOwnPtr<WebDataConsumerHandle>); 41 explicit CompositeDataConsumerHandle(PassOwnPtr<WebDataConsumerHandle>);
41 42
42 RefPtr<Context> m_context; 43 RefPtr<Context> m_context;
43 }; 44 };
44 45
45 } // namespace blink 46 } // namespace blink
46 47
47 #endif // CompositeDataConsumerHandle_h 48 #endif // CompositeDataConsumerHandle_h
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698