ozone: evdev: Sync caps lock LED state to evdev
[chromium-blink-merge.git] / chromecast / media / cma / backend / video_plane.cc
blob5d8097f2a626073e24cd7778d2e2f58d41326652
1 // Copyright 2014 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.
5 #include "chromecast/media/cma/backend/video_plane.h"
7 #include "base/memory/singleton.h"
9 namespace chromecast {
10 namespace media {
12 VideoPlane::VideoPlane() {
15 VideoPlane::~VideoPlane() {
18 class VideoPlaneRegistry {
19 public:
20 static VideoPlaneRegistry* GetInstance() {
21 return Singleton<VideoPlaneRegistry>::get();
24 VideoPlane* GetVideoPlane();
26 private:
27 friend struct DefaultSingletonTraits<VideoPlaneRegistry>;
28 friend class Singleton<VideoPlaneRegistry>;
30 VideoPlaneRegistry();
31 virtual ~VideoPlaneRegistry();
33 scoped_ptr<VideoPlane> video_plane_;
35 DISALLOW_COPY_AND_ASSIGN(VideoPlaneRegistry);
38 VideoPlaneRegistry::VideoPlaneRegistry() :
39 video_plane_(CreateVideoPlane()) {
42 VideoPlaneRegistry::~VideoPlaneRegistry() {
45 VideoPlane* VideoPlaneRegistry::GetVideoPlane() {
46 return video_plane_.get();
49 VideoPlane* GetVideoPlane() {
50 return VideoPlaneRegistry::GetInstance()->GetVideoPlane();
53 } // namespace media
54 } // namespace chromecast