| OLD | NEW |
| (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_BROWSER_GPU_GPU_ARC_VIDEO_SERVICE_HOST_H_ |
| 6 #define CONTENT_BROWSER_GPU_GPU_ARC_VIDEO_SERVICE_HOST_H_ |
| 7 |
| 8 #include <queue> |
| 9 |
| 10 #include "base/callback.h" |
| 11 #include "base/macros.h" |
| 12 #include "base/memory/weak_ptr.h" |
| 13 #include "base/threading/non_thread_safe.h" |
| 14 #include "components/arc/arc_bridge_service.h" |
| 15 #include "ipc/ipc_channel_handle.h" |
| 16 #include "ipc/ipc_listener.h" |
| 17 |
| 18 namespace content { |
| 19 |
| 20 class GpuArcVideoServiceHost : public base::NonThreadSafe, |
| 21 public arc::ArcBridgeService::Observer { |
| 22 public: |
| 23 GpuArcVideoServiceHost( |
| 24 const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner); |
| 25 ~GpuArcVideoServiceHost() override; |
| 26 |
| 27 void Initialize(); |
| 28 |
| 29 // arc::ArcBridgeService::Observer implementation. |
| 30 void OnStateChanged(arc::ArcBridgeService::State state) override; |
| 31 void OnCreateArcVideoAcceleratorConnection() override; |
| 32 |
| 33 private: |
| 34 void NotifyArcAcceleratorChannelCreated(const IPC::ChannelHandle& handle); |
| 35 void Shutdown(); |
| 36 |
| 37 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_; |
| 38 int num_pending_request_; |
| 39 base::WeakPtrFactory<GpuArcVideoServiceHost> weak_factory_; |
| 40 |
| 41 DISALLOW_COPY_AND_ASSIGN(GpuArcVideoServiceHost); |
| 42 }; |
| 43 |
| 44 } // namespace content |
| 45 |
| 46 #endif // CONTENT_BROWSER_GPU_GPU_ARC_VIDEO_SERVICE_HOST_H_ |
| OLD | NEW |