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

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: rebased with new ArcBridgeService; addressed Owen's comments 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 3f02b272d8665dd0b5fa7ed3c9e0a1366f0d4706..851ec2a64da37a78257166431b36875f6e02d153 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;
@@ -110,6 +114,16 @@ class ArcBridgeService {
virtual ~AppObserver() {}
};
+ // Notifies ARC video service events.
+ class VideoServiceObserver {
+ public:
+ // Called whenever to create video accelerator connection.
+ virtual void OnRequestArcVideoAcceleratorChannel() {}
Owen Lin 2015/12/15 03:04:06 I still don't think we should use the name/pattern
Pawel Osciak 2015/12/16 10:17:58 +1, I'd prefer this as well.
kcwu 2015/12/16 14:05:32 Done.
+
+ protected:
+ virtual ~VideoServiceObserver() {}
+ };
+
virtual ~ArcBridgeService();
// Gets the global instance of the ARC Bridge Service. This can only be
@@ -140,6 +154,8 @@ class ArcBridgeService {
void RemoveObserver(Observer* observer);
void AddNotificationObserver(NotificationObserver* observer);
void RemoveNotificationObserver(NotificationObserver* observer);
+ void AddVideoServiceObserver(VideoServiceObserver* observer);
+ void RemoveVideoServiceObserver(VideoServiceObserver* observer);
// Adds or removes ARC app observers. This can only be called on the thread
// that this class was created on.
@@ -178,6 +194,9 @@ class ArcBridgeService {
const std::string& activity,
ScaleFactor scale_factor) = 0;
+ virtual bool NotifyVideoAcceleratorChannelCreated(
+ const IPC::ChannelHandle& handle) = 0;
+
protected:
ArcBridgeService();
@@ -196,6 +215,10 @@ class ArcBridgeService {
return app_observer_list_;
}
+ base::ObserverList<VideoServiceObserver>& video_service_observer_list() {
+ return video_service_observer_list_;
+ }
+
bool CalledOnValidThread();
private:
@@ -206,6 +229,7 @@ class ArcBridgeService {
base::ObserverList<Observer> observer_list_;
base::ObserverList<NotificationObserver> notification_observer_list_;
+ base::ObserverList<VideoServiceObserver> video_service_observer_list_;
base::ObserverList<AppObserver> app_observer_list_;

Powered by Google App Engine
This is Rietveld 408576698