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/trace_event/trace_event.h" | 8 #include "base/trace_event/trace_event.h" |
9 #include "ui/ozone/platform_object.h" | 9 #include "ui/ozone/platform_object.h" |
10 #include "ui/ozone/platform_selection.h" | 10 #include "ui/ozone/platform_selection.h" |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 } | 49 } |
50 | 50 |
51 MediaOzonePlatform* CreateMediaOzonePlatformGbm() { | 51 MediaOzonePlatform* CreateMediaOzonePlatformGbm() { |
52 return new MediaOzonePlatformStub; | 52 return new MediaOzonePlatformStub; |
53 } | 53 } |
54 | 54 |
55 MediaOzonePlatform* CreateMediaOzonePlatformTest() { | 55 MediaOzonePlatform* CreateMediaOzonePlatformTest() { |
56 return new MediaOzonePlatformStub; | 56 return new MediaOzonePlatformStub; |
57 } | 57 } |
58 | 58 |
| 59 MediaOzonePlatform* CreateMediaOzonePlatformHeadless() { |
| 60 return new MediaOzonePlatformStub; |
| 61 } |
| 62 |
59 MediaOzonePlatform::MediaOzonePlatform() { | 63 MediaOzonePlatform::MediaOzonePlatform() { |
60 CHECK(!instance_) << "There should only be a single MediaOzonePlatform."; | 64 CHECK(!instance_) << "There should only be a single MediaOzonePlatform."; |
61 instance_ = this; | 65 instance_ = this; |
62 } | 66 } |
63 | 67 |
64 MediaOzonePlatform::~MediaOzonePlatform() { | 68 MediaOzonePlatform::~MediaOzonePlatform() { |
65 CHECK_EQ(instance_, this); | 69 CHECK_EQ(instance_, this); |
66 instance_ = NULL; | 70 instance_ = NULL; |
67 } | 71 } |
68 | 72 |
(...skipping 23 matching lines...) Expand all Loading... |
92 ui::PlatformObject<MediaOzonePlatform>::Create(); | 96 ui::PlatformObject<MediaOzonePlatform>::Create(); |
93 | 97 |
94 // TODO(spang): Currently need to leak this object. | 98 // TODO(spang): Currently need to leak this object. |
95 CHECK_EQ(instance_, platform.release()); | 99 CHECK_EQ(instance_, platform.release()); |
96 } | 100 } |
97 | 101 |
98 // static | 102 // static |
99 MediaOzonePlatform* MediaOzonePlatform::instance_; | 103 MediaOzonePlatform* MediaOzonePlatform::instance_; |
100 | 104 |
101 } // namespace media | 105 } // namespace media |
OLD | NEW |