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

Side by Side Diff: components/arc/arc_bridge_service_impl.h

Issue 1451353002: Implement GpuArcVideoService for arc video accelerator (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed Luis's comments Created 4 years, 12 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 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 COMPONENTS_ARC_ARC_BRIDGE_SERVICE_IMPL_H_ 5 #ifndef COMPONENTS_ARC_ARC_BRIDGE_SERVICE_IMPL_H_
6 #define COMPONENTS_ARC_ARC_BRIDGE_SERVICE_IMPL_H_ 6 #define COMPONENTS_ARC_ARC_BRIDGE_SERVICE_IMPL_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 const std::string& activity) override; 56 const std::string& activity) override;
57 57
58 // Requests to load an icon of specific scale_factor. 58 // Requests to load an icon of specific scale_factor.
59 bool RequestAppIcon(const std::string& package, 59 bool RequestAppIcon(const std::string& package,
60 const std::string& activity, 60 const std::string& activity,
61 ScaleFactor scale_factor) override; 61 ScaleFactor scale_factor) override;
62 62
63 // Requests ARC process list. 63 // Requests ARC process list.
64 bool RequestProcessList() override; 64 bool RequestProcessList() override;
65 65
66 // ArcBridgeHost:
67 void OnVideoInstanceReady(VideoInstancePtr video_ptr) override;
68
69 VideoInstance* video_instance() override { return video_ptr_.get(); }
70
66 private: 71 private:
67 friend class ArcBridgeTest; 72 friend class ArcBridgeTest;
68 FRIEND_TEST_ALL_PREFIXES(ArcBridgeTest, Basic); 73 FRIEND_TEST_ALL_PREFIXES(ArcBridgeTest, Basic);
69 FRIEND_TEST_ALL_PREFIXES(ArcBridgeTest, Prerequisites); 74 FRIEND_TEST_ALL_PREFIXES(ArcBridgeTest, Prerequisites);
70 FRIEND_TEST_ALL_PREFIXES(ArcBridgeTest, ShutdownMidStartup); 75 FRIEND_TEST_ALL_PREFIXES(ArcBridgeTest, ShutdownMidStartup);
71 76
72 // If all pre-requisites are true (ARC is available, it has been enabled, and 77 // If all pre-requisites are true (ARC is available, it has been enabled, and
73 // the session has started), and ARC is stopped, start ARC. If ARC is running 78 // the session has started), and ARC is stopped, start ARC. If ARC is running
74 // and the pre-requisites stop being true, stop ARC. 79 // and the pre-requisites stop being true, stop ARC.
75 void PrerequisitesChanged(); 80 void PrerequisitesChanged();
(...skipping 30 matching lines...) Expand all
106 void OnStopped() override; 111 void OnStopped() override;
107 112
108 // DBus callbacks. 113 // DBus callbacks.
109 void OnArcAvailable(bool available); 114 void OnArcAvailable(bool available);
110 115
111 scoped_ptr<ArcBridgeBootstrap> bootstrap_; 116 scoped_ptr<ArcBridgeBootstrap> bootstrap_;
112 117
113 // Mojo endpoints. 118 // Mojo endpoints.
114 mojo::Binding<ArcBridgeHost> binding_; 119 mojo::Binding<ArcBridgeHost> binding_;
115 ArcBridgeInstancePtr instance_ptr_; 120 ArcBridgeInstancePtr instance_ptr_;
121 VideoInstancePtr video_ptr_;
116 122
117 // If the user's session has started. 123 // If the user's session has started.
118 bool session_started_; 124 bool session_started_;
119 125
120 // WeakPtrFactory to use callbacks. 126 // WeakPtrFactory to use callbacks.
121 base::WeakPtrFactory<ArcBridgeServiceImpl> weak_factory_; 127 base::WeakPtrFactory<ArcBridgeServiceImpl> weak_factory_;
122 128
123 DISALLOW_COPY_AND_ASSIGN(ArcBridgeServiceImpl); 129 DISALLOW_COPY_AND_ASSIGN(ArcBridgeServiceImpl);
124 }; 130 };
125 131
126 } // namespace arc 132 } // namespace arc
127 133
128 #endif // COMPONENTS_ARC_ARC_BRIDGE_SERVICE_IMPL_H_ 134 #endif // COMPONENTS_ARC_ARC_BRIDGE_SERVICE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698