Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "ui/ozone/public/native_pixmap_manager.h" | |
| 6 | |
| 7 #include "base/trace_event/trace_event.h" | |
| 8 #include "ui/ozone/platform_object.h" | |
| 9 #include "ui/ozone/platform_selection.h" | |
| 10 | |
| 11 namespace ui { | |
| 12 | |
| 13 namespace { | |
| 14 | |
| 15 NativePixmapManager* g_instance = nullptr; | |
| 16 | |
| 17 } // namespace | |
| 18 | |
| 19 // static | |
| 20 NativePixmapManager* NativePixmapManager::GetInstance() { | |
| 21 return g_instance; | |
| 22 } | |
| 23 | |
| 24 // static | |
| 25 void NativePixmapManager::SetInstance( | |
| 26 scoped_ptr<NativePixmapManager> instance) { | |
| 27 DCHECK(!g_instance); | |
| 28 DCHECK(instance); | |
| 29 g_instance = instance.release(); | |
| 30 } | |
| 31 | |
| 32 // static | |
| 33 scoped_ptr<NativePixmapManager> NativePixmapManager::Create() { | |
| 34 TRACE_EVENT1("ozone", "NativePixmapManager::Create", "platform", | |
| 35 GetOzonePlatformName()); | |
| 36 scoped_ptr<NativePixmapManager> manager = | |
|
reveman
2015/07/23 14:46:12
just "return PlatformObject<NativePixmapManager>::
dshwang
2015/07/23 16:42:09
Done.
| |
| 37 PlatformObject<NativePixmapManager>::Create(); | |
| 38 return manager.Pass(); | |
| 39 } | |
| 40 | |
| 41 NativePixmapManager::NativePixmapManager() {} | |
| 42 | |
| 43 NativePixmapManager::~NativePixmapManager() {} | |
| 44 | |
| 45 } // namespace ui | |
| OLD | NEW |