OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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 #include "media/ozone/media_ozone_platform.h" | 5 #include "media/ozone/media_ozone_platform.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/trace_event/trace_event.h" | 9 #include "base/trace_event/trace_event.h" |
10 #include "ui/ozone/platform_object.h" | 10 #include "ui/ozone/platform_object.h" |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 } | 54 } |
55 | 55 |
56 MediaOzonePlatform* CreateMediaOzonePlatformHeadless() { | 56 MediaOzonePlatform* CreateMediaOzonePlatformHeadless() { |
57 return new MediaOzonePlatformStub; | 57 return new MediaOzonePlatformStub; |
58 } | 58 } |
59 | 59 |
60 MediaOzonePlatform* CreateMediaOzonePlatformWayland() { | 60 MediaOzonePlatform* CreateMediaOzonePlatformWayland() { |
61 return new MediaOzonePlatformStub; | 61 return new MediaOzonePlatformStub; |
62 } | 62 } |
63 | 63 |
| 64 MediaOzonePlatform* CreateMediaOzonePlatformX11() { |
| 65 return new MediaOzonePlatformStub; |
| 66 } |
| 67 |
64 MediaOzonePlatform::MediaOzonePlatform() { | 68 MediaOzonePlatform::MediaOzonePlatform() { |
65 CHECK(!instance_) << "There should only be a single MediaOzonePlatform."; | 69 CHECK(!instance_) << "There should only be a single MediaOzonePlatform."; |
66 instance_ = this; | 70 instance_ = this; |
67 } | 71 } |
68 | 72 |
69 MediaOzonePlatform::~MediaOzonePlatform() { | 73 MediaOzonePlatform::~MediaOzonePlatform() { |
70 CHECK_EQ(instance_, this); | 74 CHECK_EQ(instance_, this); |
71 instance_ = NULL; | 75 instance_ = NULL; |
72 } | 76 } |
73 | 77 |
(...skipping 23 matching lines...) Expand all Loading... |
97 ui::PlatformObject<MediaOzonePlatform>::Create(); | 101 ui::PlatformObject<MediaOzonePlatform>::Create(); |
98 | 102 |
99 // TODO(spang): Currently need to leak this object. | 103 // TODO(spang): Currently need to leak this object. |
100 CHECK_EQ(instance_, platform.release()); | 104 CHECK_EQ(instance_, platform.release()); |
101 } | 105 } |
102 | 106 |
103 // static | 107 // static |
104 MediaOzonePlatform* MediaOzonePlatform::instance_; | 108 MediaOzonePlatform* MediaOzonePlatform::instance_; |
105 | 109 |
106 } // namespace media | 110 } // namespace media |
OLD | NEW |