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

Unified Diff: sky/engine/platform/fetcher/DataPipeDrainer.h

Issue 811873003: Move Sky's DataPipeDrainer to mojo/common (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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 side-by-side diff with in-line comments
Download patch
Index: sky/engine/platform/fetcher/DataPipeDrainer.h
diff --git a/sky/engine/platform/fetcher/DataPipeDrainer.h b/sky/engine/platform/fetcher/DataPipeDrainer.h
deleted file mode 100644
index 2f6ce6495d453823127e9320fce2fc5995d4ec91..0000000000000000000000000000000000000000
--- a/sky/engine/platform/fetcher/DataPipeDrainer.h
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef SKY_ENGINE_PLATFORM_FETCHER_DATAPIPEDRAINER_H_
-#define SKY_ENGINE_PLATFORM_FETCHER_DATAPIPEDRAINER_H_
-
-#include "base/memory/weak_ptr.h"
-#include "mojo/common/handle_watcher.h"
-#include "mojo/public/cpp/system/core.h"
-
-namespace blink {
-
-class DataPipeDrainer {
- public:
- class Client {
- public:
- virtual void OnDataAvailable(const void* data, size_t num_bytes) = 0;
- virtual void OnDataComplete() = 0;
-
- protected:
- virtual ~Client() { }
- };
-
- DataPipeDrainer(Client*, mojo::ScopedDataPipeConsumerHandle source);
- ~DataPipeDrainer();
-
- private:
- void ReadData();
- void WaitForData();
- void WaitComplete(MojoResult result);
-
- Client* client_;
- mojo::ScopedDataPipeConsumerHandle source_;
- mojo::common::HandleWatcher handle_watcher_;
-
- base::WeakPtrFactory<DataPipeDrainer> weak_factory_;
-
- DISALLOW_COPY_AND_ASSIGN(DataPipeDrainer);
-};
-
-} // namespace blink
-
-#endif // SKY_ENGINE_PLATFORM_FETCHER_DATAPIPEDRAINER_H_

Powered by Google App Engine
This is Rietveld 408576698