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

Side by Side Diff: content/child/web_data_producer_handle_impl.h

Issue 850043008: [DO NOT REVIEW][DO NOT COMMIT] Implement WebDataProducerHandleImpl. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_CHILD_WEB_DATA_PRODUCER_HANDLE_IMPL_H_
6 #define CONTENT_CHILD_WEB_DATA_PRODUCER_HANDLE_IMPL_H_
7
8 #include "base/memory/scoped_ptr.h"
9 #include "content/common/content_export.h"
10 #include "mojo/common/handle_watcher.h"
11 #include "mojo/public/cpp/system/data_pipe.h"
12 #include "third_party/WebKit/public/platform/WebDataProducerHandle.h"
13
14 namespace content {
15
16 class CONTENT_EXPORT WebDataProducerHandleImpl final
17 : public NON_EXPORTED_BASE(blink::WebDataProducerHandle) {
18 typedef mojo::ScopedDataPipeProducerHandle Handle;
19 public:
20 explicit WebDataProducerHandleImpl(Handle handle);
21 virtual ~WebDataProducerHandleImpl();
22
23 virtual Result write(const void* data, size_t size, Flags flags,
24 size_t* writtenSize);
25 virtual Result beginWrite(void** buffer, Flags flags, size_t* available);
26 virtual Result endWrite(size_t writtenSize);
27 virtual void registerClient(Client* client);
28 virtual void unregisterClient();
29
30 private:
31 Result HandleWriteResult(MojoResult);
32 void OnHandleGotWritable(MojoResult);
33
34 Handle handle_;
35 Client* client_;
36 mojo::common::HandleWatcher handle_watcher_;
37 };
38
39 } // namespace content
40
41 #endif // CONTENT_CHILD_WEB_DATA_PRODUCER_HANDLE_IMPL_H_
OLDNEW
« no previous file with comments | « content/child/web_data_consumer_handle_impl.cc ('k') | content/child/web_data_producer_handle_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698