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