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> |
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
418 env->GetVar("IBUS_ADDRESS_FILE", &address_file_path); | 418 env->GetVar("IBUS_ADDRESS_FILE", &address_file_path); |
419 DCHECK(!address_file_path.empty()); | 419 DCHECK(!address_file_path.empty()); |
420 | 420 |
421 if (instance->IsWatching()) | 421 if (instance->IsWatching()) |
422 instance->StopNow(); | 422 instance->StopNow(); |
423 instance->watcher_ = new base::files::FilePathWatcher; | 423 instance->watcher_ = new base::files::FilePathWatcher; |
424 | 424 |
425 // The |delegate| is owned by watcher. | 425 // The |delegate| is owned by watcher. |
426 IBusAddressFileWatcherDelegate* delegate = | 426 IBusAddressFileWatcherDelegate* delegate = |
427 new IBusAddressFileWatcherDelegate(ibus_address, controller, instance); | 427 new IBusAddressFileWatcherDelegate(ibus_address, controller, instance); |
428 bool result = instance->watcher_->Watch(FilePath(address_file_path), | 428 bool result = instance->watcher_->Watch(FilePath(address_file_path), false, |
429 delegate); | 429 delegate); |
430 DCHECK(result); | 430 DCHECK(result); |
431 } | 431 } |
432 | 432 |
433 void StopNow() { | 433 void StopNow() { |
434 delete watcher_; | 434 delete watcher_; |
435 watcher_ = NULL; | 435 watcher_ = NULL; |
436 } | 436 } |
437 | 437 |
438 void StopSoon() { | 438 void StopSoon() { |
(...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1144 | 1144 |
1145 // static | 1145 // static |
1146 bool IBusControllerImpl::FindAndUpdatePropertyForTesting( | 1146 bool IBusControllerImpl::FindAndUpdatePropertyForTesting( |
1147 const chromeos::input_method::InputMethodProperty& new_prop, | 1147 const chromeos::input_method::InputMethodProperty& new_prop, |
1148 chromeos::input_method::InputMethodPropertyList* prop_list) { | 1148 chromeos::input_method::InputMethodPropertyList* prop_list) { |
1149 return FindAndUpdateProperty(new_prop, prop_list); | 1149 return FindAndUpdateProperty(new_prop, prop_list); |
1150 } | 1150 } |
1151 | 1151 |
1152 } // namespace input_method | 1152 } // namespace input_method |
1153 } // namespace chromeos | 1153 } // namespace chromeos |
OLD | NEW |