OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "base/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/debug/trace_event.h" | 6 #include "base/debug/trace_event.h" |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "ui/base/cursor/ozone/cursor_factory_ozone.h" | 8 #include "ui/base/cursor/ozone/cursor_factory_ozone.h" |
9 #include "ui/ozone/ozone_platform.h" | 9 #include "ui/ozone/ozone_platform.h" |
10 #include "ui/ozone/ozone_platform_list.h" | 10 #include "ui/ozone/ozone_platform_list.h" |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 | 58 |
59 // Inject ozone interfaces. | 59 // Inject ozone interfaces. |
60 gfx::SurfaceFactoryOzone::SetInstance(instance_->GetSurfaceFactoryOzone()); | 60 gfx::SurfaceFactoryOzone::SetInstance(instance_->GetSurfaceFactoryOzone()); |
61 ui::EventFactoryOzone::SetInstance(instance_->GetEventFactoryOzone()); | 61 ui::EventFactoryOzone::SetInstance(instance_->GetEventFactoryOzone()); |
62 ui::InputMethodContextFactoryOzone::SetInstance( | 62 ui::InputMethodContextFactoryOzone::SetInstance( |
63 instance_->GetInputMethodContextFactoryOzone()); | 63 instance_->GetInputMethodContextFactoryOzone()); |
64 ui::CursorFactoryOzone::SetInstance(instance_->GetCursorFactoryOzone()); | 64 ui::CursorFactoryOzone::SetInstance(instance_->GetCursorFactoryOzone()); |
65 } | 65 } |
66 | 66 |
67 // static | 67 // static |
| 68 OzonePlatform* OzonePlatform::GetInstance() { |
| 69 CHECK(instance_) << "OzonePlatform is not initialized"; |
| 70 return instance_; |
| 71 } |
| 72 |
| 73 // static |
68 OzonePlatform* OzonePlatform::instance_; | 74 OzonePlatform* OzonePlatform::instance_; |
69 | 75 |
70 } // namespace ui | 76 } // namespace ui |
OLD | NEW |