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

Unified Diff: components/arc/arc_bridge_service.h

Issue 1451353002: Implement GpuArcVideoService for arc video accelerator (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits Created 5 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: components/arc/arc_bridge_service.h
diff --git a/components/arc/arc_bridge_service.h b/components/arc/arc_bridge_service.h
index 98902e60e0424b5c197c93c8d4709f9a7217976f..cb5a3522f53a1fdb6c69436a8954ae100e8edece 100644
--- a/components/arc/arc_bridge_service.h
+++ b/components/arc/arc_bridge_service.h
@@ -19,6 +19,10 @@ namespace base {
class CommandLine;
} // namespace base
+namespace IPC {
+class ChannelHandle;
+} // namespace IPC
+
namespace arc {
class ArcBridgeBootstrap;
@@ -128,6 +132,16 @@ class ArcBridgeService {
virtual ~ProcessObserver() {}
};
+ // Notifies ARC video service events.
+ class VideoService {
+ public:
+ // Called whenever to create video accelerator connection.
+ virtual void OnRequestArcVideoAcceleratorChannel() {}
+
+ protected:
+ virtual ~VideoService() {}
+ };
+
virtual ~ArcBridgeService();
// Gets the global instance of the ARC Bridge Service. This can only be
@@ -169,6 +183,10 @@ class ArcBridgeService {
void AddProcessObserver(ProcessObserver* observer);
void RemoveProcessObserver(ProcessObserver* observer);
+ // Set VideoService provider. This can only be called on the thread that
+ // this class was created on.
+ void SetVideoService(VideoService* service);
+
// Gets the current state of the bridge service.
State state() const { return state_; }
@@ -205,6 +223,10 @@ class ArcBridgeService {
// When the result comes back, Observer::OnUpdateProcessList() is called.
virtual bool RequestProcessList() = 0;
+ // Notify the ipc handle for video accelerator is created.
+ virtual void NotifyVideoAcceleratorChannelCreated(
+ const IPC::ChannelHandle& handle) = 0;
+
protected:
ArcBridgeService();
@@ -228,6 +250,8 @@ class ArcBridgeService {
return process_observer_list_;
}
+ VideoService* video_service() { return video_service_; }
+
bool CalledOnValidThread();
private:
@@ -241,6 +265,8 @@ class ArcBridgeService {
base::ObserverList<AppObserver> app_observer_list_;
base::ObserverList<ProcessObserver> process_observer_list_;
+ VideoService* video_service_;
+
base::ThreadChecker thread_checker_;
// If the ARC instance service is available.

Powered by Google App Engine
This is Rietveld 408576698