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/logging.h" | 6 #include "base/logging.h" |
7 #include "ui/ozone/ozone_platform.h" | 7 #include "ui/ozone/ozone_platform.h" |
8 #include "ui/ozone/ozone_platform_list.h" | 8 #include "ui/ozone/ozone_platform_list.h" |
9 #include "ui/ozone/ozone_switches.h" | 9 #include "ui/ozone/ozone_switches.h" |
10 | 10 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 // static | 47 // static |
48 void OzonePlatform::Initialize() { | 48 void OzonePlatform::Initialize() { |
49 if (instance_) | 49 if (instance_) |
50 return; | 50 return; |
51 | 51 |
52 instance_ = CreatePlatform(GetRequestedPlatform()); | 52 instance_ = CreatePlatform(GetRequestedPlatform()); |
53 | 53 |
54 // Inject ozone interfaces. | 54 // Inject ozone interfaces. |
55 gfx::SurfaceFactoryOzone::SetInstance(instance_->GetSurfaceFactoryOzone()); | 55 gfx::SurfaceFactoryOzone::SetInstance(instance_->GetSurfaceFactoryOzone()); |
56 ui::EventFactoryOzone::SetInstance(instance_->GetEventFactoryOzone()); | 56 ui::EventFactoryOzone::SetInstance(instance_->GetEventFactoryOzone()); |
| 57 ui::InputMethodContextFactoryOzone::SetInstance( |
| 58 instance_->GetInputMethodContextFactoryOzone()); |
57 } | 59 } |
58 | 60 |
59 // static | 61 // static |
60 OzonePlatform* OzonePlatform::instance_; | 62 OzonePlatform* OzonePlatform::instance_; |
61 | 63 |
62 } // namespace ui | 64 } // namespace ui |
OLD | NEW |