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

Side by Side Diff: sky/engine/core/loader/MojoLoader.h

Issue 664573004: Live the dream (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: DEPS Created 6 years, 2 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 | « sky/engine/core/loader/DocumentWriter.cpp ('k') | sky/engine/core/loader/MojoLoader.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 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 MojoLoader_h 5 #ifndef MojoLoader_h
6 #define MojoLoader_h 6 #define MojoLoader_h
7 7
8 #include "base/memory/weak_ptr.h"
9 #include "mojo/common/handle_watcher.h"
10 #include "mojo/public/cpp/system/data_pipe.h" 8 #include "mojo/public/cpp/system/data_pipe.h"
11 #include "platform/fetcher/DataPipeDrainer.h"
12 #include "platform/weborigin/KURL.h" 9 #include "platform/weborigin/KURL.h"
13 10
14 namespace blink { 11 namespace blink {
15 12
16 class LocalFrame; 13 class LocalFrame;
17 14
18 class MojoLoader : public DataPipeDrainer::Client { 15 class MojoLoader {
19 public: 16 public:
20 explicit MojoLoader(LocalFrame&); 17 explicit MojoLoader(LocalFrame&);
21 18
22 void load(const KURL&, mojo::ScopedDataPipeConsumerHandle); 19 void load(const KURL&, mojo::ScopedDataPipeConsumerHandle);
23 20
24 private: 21 private:
25 LocalFrame& m_frame; 22 LocalFrame& m_frame;
26
27 // From DataPipeDrainer::Client
28 void OnDataAvailable(const void* data, size_t numberOfBytes) override;
29 void OnDataComplete() override;
30
31 OwnPtr<DataPipeDrainer> m_drainJob;
32 }; 23 };
33 24
34 } 25 }
35 26
36 #endif 27 #endif
OLDNEW
« no previous file with comments | « sky/engine/core/loader/DocumentWriter.cpp ('k') | sky/engine/core/loader/MojoLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698