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_ui_controller.h" | 5 #include "chrome/browser/chromeos/input_method/ibus_ui_controller.h" |
6 | 6 |
7 #if defined(HAVE_IBUS) | 7 #if defined(HAVE_IBUS) |
8 #include <ibus.h> | 8 #include <ibus.h> |
9 #endif | 9 #endif |
10 | 10 |
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
318 ui_->SetCursorLocation(NULL, x, y, w, h); | 318 ui_->SetCursorLocation(NULL, x, y, w, h); |
319 } | 319 } |
320 | 320 |
321 void set_ui(IBusUiControllerImpl* ui) { | 321 void set_ui(IBusUiControllerImpl* ui) { |
322 ui_ = ui; | 322 ui_ = ui; |
323 } | 323 } |
324 | 324 |
325 private: | 325 private: |
326 std::string GetCurrentInputMethodId() { | 326 std::string GetCurrentInputMethodId() { |
327 InputMethodManager* manager = InputMethodManager::GetInstance(); | 327 InputMethodManager* manager = InputMethodManager::GetInstance(); |
328 return manager->current_input_method().id(); | 328 return manager->GetCurrentInputMethod().id(); |
329 } | 329 } |
330 | 330 |
331 IBusUiControllerImpl* ui_; | 331 IBusUiControllerImpl* ui_; |
332 }; | 332 }; |
333 | 333 |
334 // Returns a ui::InputMethodIBus object which is associated with the root | 334 // Returns a ui::InputMethodIBus object which is associated with the root |
335 // window. | 335 // window. |
336 static ui::InputMethodIBus* GetChromeInputMethod() { | 336 static ui::InputMethodIBus* GetChromeInputMethod() { |
337 return static_cast<ui::InputMethodIBus*>( | 337 return static_cast<ui::InputMethodIBus*>( |
338 ash::Shell::GetRootWindow()->GetProperty( | 338 ash::Shell::GetRootWindow()->GetProperty( |
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
739 #else | 739 #else |
740 return new IBusUiControllerStubImpl; | 740 return new IBusUiControllerStubImpl; |
741 #endif | 741 #endif |
742 } | 742 } |
743 | 743 |
744 IBusUiController::~IBusUiController() { | 744 IBusUiController::~IBusUiController() { |
745 } | 745 } |
746 | 746 |
747 } // namespace input_method | 747 } // namespace input_method |
748 } // namespace chromeos | 748 } // namespace chromeos |
OLD | NEW |