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

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

Issue 620303002: Implement WebDataConsumerHandle. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 2014 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_CONSUMER_HANDLE_IMPL_H_
6 #define CONTENT_CHILD_WEB_DATA_CONSUMER_HANDLE_IMPL_H_
7
8 #include "base/memory/scoped_ptr.h"
9 #include "mojo/common/handle_watcher.h"
10 #include "mojo/public/cpp/system/data_pipe.h"
11 #include "third_party/WebKit/public/platform/WebDataConsumerHandle.h"
12
13 namespace content {
14
15 class WebDataConsumerHandleImpl final : public blink::WebDataConsumerHandle {
16 typedef mojo::ScopedDataPipeConsumerHandle Handle;
17 public:
18 explicit WebDataConsumerHandleImpl(Handle handle);
19 virtual ~WebDataConsumerHandleImpl();
20
21 virtual Result read(void* data, size_t size, Flags flags, size_t* readSize);
22 virtual Result beginRead(const void** buffer, Flags flags, size_t* available);
23 virtual Result endRead(size_t readSize);
24 virtual void registerClient(Client* client);
25 virtual void unregisterClient();
26
27 private:
28 Result HandleReadResult(MojoResult);
29 void OnHandleGotReadable(MojoResult);
30
31 Handle handle_;
32 Client* client_;
33 mojo::common::HandleWatcher handle_watcher_;
34 };
35
36 } // namespace content
37
38 #endif // CONTENT_CHILD_WEB_DATA_CONSUMER_HANDLE_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | content/child/web_data_consumer_handle_impl.cc » ('j') | content/child/web_data_consumer_handle_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698