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 "ui/views/linux_ui/linux_ui.h" | 5 #include "ui/views/linux_ui/linux_ui.h" |
6 | 6 |
7 #include "ui/base/ime/linux/linux_input_method_context_factory.h" | 7 #include "ui/base/ime/linux/linux_input_method_context_factory.h" |
8 #include "ui/gfx/linux_font_delegate.h" | 8 #include "ui/gfx/linux_font_delegate.h" |
9 #include "ui/shell_dialogs/linux_shell_dialog.h" | 9 #include "ui/shell_dialogs/linux_shell_dialog.h" |
10 | 10 |
11 namespace { | 11 namespace { |
12 | 12 |
13 views::LinuxUI* g_linux_ui = NULL; | 13 views::LinuxUI* g_linux_ui = NULL; |
14 | 14 |
15 } // namespace | 15 } // namespace |
16 | 16 |
17 namespace views { | 17 namespace views { |
18 | 18 |
19 void LinuxUI::SetInstance(LinuxUI* instance) { | 19 void LinuxUI::SetInstance(LinuxUI* instance) { |
20 delete g_linux_ui; | 20 delete g_linux_ui; |
21 g_linux_ui = instance; | 21 g_linux_ui = instance; |
22 LinuxInputMethodContextFactory::SetInstance(instance); | 22 LinuxInputMethodContextFactory::SetInstance(instance); |
23 LinuxFontDelegate::SetInstance(instance); | 23 LinuxFontDelegate::SetInstance(instance); |
24 LinuxShellDialog::SetInstance(instance); | 24 LinuxShellDialog::SetInstance(instance); |
| 25 ui::SetTextEditKeyBindingsDelegate(instance); |
25 } | 26 } |
26 | 27 |
27 LinuxUI* LinuxUI::instance() { | 28 LinuxUI* LinuxUI::instance() { |
28 return g_linux_ui; | 29 return g_linux_ui; |
29 } | 30 } |
30 | 31 |
31 } // namespace views | 32 } // namespace views |
OLD | NEW |