| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/chromeos/input_method/ibus_controller_impl.h" | 5 #include "chrome/browser/chromeos/input_method/ibus_controller_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> // for std::reverse. | 7 #include <algorithm> // for std::reverse. |
| 8 #include <cstdio> | 8 #include <cstdio> |
| 9 #include <cstring> // for std::strcmp. | 9 #include <cstring> // for std::strcmp. |
| 10 #include <set> | 10 #include <set> |
| 11 #include <sstream> | 11 #include <sstream> |
| 12 #include <stack> | 12 #include <stack> |
| 13 #include <utility> | 13 #include <utility> |
| 14 | 14 |
| 15 #include "ash/shell.h" | 15 #include "ash/shell.h" |
| 16 #include "base/bind.h" | 16 #include "base/bind.h" |
| 17 #include "base/environment.h" | 17 #include "base/environment.h" |
| 18 #include "base/files/file_path_watcher.h" | 18 #include "base/files/file_path_watcher.h" |
| 19 #include "base/memory/scoped_ptr.h" | 19 #include "base/memory/scoped_ptr.h" |
| 20 #include "base/message_loop.h" | 20 #include "base/message_loop.h" |
| 21 #include "base/rand_util.h" | 21 #include "base/rand_util.h" |
| 22 #include "base/stringprintf.h" | 22 #include "base/stringprintf.h" |
| 23 #include "base/strings/string_split.h" | 23 #include "base/strings/string_split.h" |
| 24 #include "chrome/browser/chromeos/input_method/input_method_config.h" | |
| 25 #include "chrome/browser/chromeos/input_method/input_method_property.h" | |
| 26 #include "chrome/browser/chromeos/input_method/input_method_util.h" | 24 #include "chrome/browser/chromeos/input_method/input_method_util.h" |
| 27 #include "chromeos/dbus/dbus_thread_manager.h" | 25 #include "chromeos/dbus/dbus_thread_manager.h" |
| 28 #include "chromeos/dbus/ibus/ibus_client.h" | 26 #include "chromeos/dbus/ibus/ibus_client.h" |
| 29 #include "chromeos/dbus/ibus/ibus_config_client.h" | 27 #include "chromeos/dbus/ibus/ibus_config_client.h" |
| 30 #include "chromeos/dbus/ibus/ibus_constants.h" | 28 #include "chromeos/dbus/ibus/ibus_constants.h" |
| 31 #include "chromeos/dbus/ibus/ibus_input_context_client.h" | 29 #include "chromeos/dbus/ibus/ibus_input_context_client.h" |
| 32 #include "chromeos/dbus/ibus/ibus_panel_service.h" | 30 #include "chromeos/dbus/ibus/ibus_panel_service.h" |
| 33 #include "chromeos/dbus/ibus/ibus_property.h" | 31 #include "chromeos/dbus/ibus/ibus_property.h" |
| 32 #include "chromeos/ime/input_method_config.h" |
| 33 #include "chromeos/ime/input_method_property.h" |
| 34 #include "ui/aura/client/aura_constants.h" | 34 #include "ui/aura/client/aura_constants.h" |
| 35 #include "ui/aura/root_window.h" | 35 #include "ui/aura/root_window.h" |
| 36 #include "ui/base/ime/input_method_ibus.h" | 36 #include "ui/base/ime/input_method_ibus.h" |
| 37 | 37 |
| 38 namespace { | 38 namespace { |
| 39 | 39 |
| 40 // Finds a property which has |new_prop.key| from |prop_list|, and replaces the | 40 // Finds a property which has |new_prop.key| from |prop_list|, and replaces the |
| 41 // property with |new_prop|. Returns true if such a property is found. | 41 // property with |new_prop|. Returns true if such a property is found. |
| 42 bool FindAndUpdateProperty( | 42 bool FindAndUpdateProperty( |
| 43 const chromeos::input_method::InputMethodProperty& new_prop, | 43 const chromeos::input_method::InputMethodProperty& new_prop, |
| (...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 384 | 384 |
| 385 // static | 385 // static |
| 386 bool IBusControllerImpl::FindAndUpdatePropertyForTesting( | 386 bool IBusControllerImpl::FindAndUpdatePropertyForTesting( |
| 387 const chromeos::input_method::InputMethodProperty& new_prop, | 387 const chromeos::input_method::InputMethodProperty& new_prop, |
| 388 chromeos::input_method::InputMethodPropertyList* prop_list) { | 388 chromeos::input_method::InputMethodPropertyList* prop_list) { |
| 389 return FindAndUpdateProperty(new_prop, prop_list); | 389 return FindAndUpdateProperty(new_prop, prop_list); |
| 390 } | 390 } |
| 391 | 391 |
| 392 } // namespace input_method | 392 } // namespace input_method |
| 393 } // namespace chromeos | 393 } // namespace chromeos |
| OLD | NEW |