OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 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 #ifndef CHROME_BROWSER_CHROMEOS_INPUT_METHOD_MODE_INDICATOR_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_INPUT_METHOD_MODE_INDICATOR_CONTROLLER_H_ |
| 7 |
| 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "chromeos/ime/input_method_manager.h" |
| 10 |
| 11 namespace gfx { |
| 12 class Rect; |
| 13 } // namespace gfx |
| 14 |
| 15 namespace chromeos { |
| 16 namespace input_method { |
| 17 |
| 18 class ModeIndicatorWidget; |
| 19 |
| 20 // ModeIndicatorController is the controller of ModeIndicatiorWidget on the |
| 21 // MVC model. |
| 22 class ModeIndicatorController |
| 23 : public InputMethodManager::Observer { |
| 24 public: |
| 25 // This class takes the ownership of |mi_widget|. |
| 26 explicit ModeIndicatorController(ModeIndicatorWidget *mi_widget); |
| 27 virtual ~ModeIndicatorController(); |
| 28 |
| 29 // Set cursor location, which is the base point to display this indicator. |
| 30 // Bacisally this indicator is displayed underneath the cursor. |
| 31 void SetCursorLocation(const gfx::Rect& cursor_location); |
| 32 |
| 33 private: |
| 34 // InputMethodManager::Observer implementation. |
| 35 virtual void InputMethodChanged(InputMethodManager* manager, |
| 36 bool show_message) OVERRIDE; |
| 37 virtual void InputMethodPropertyChanged(InputMethodManager* manager) OVERRIDE; |
| 38 |
| 39 scoped_ptr<ModeIndicatorWidget> mi_widget_; |
| 40 |
| 41 DISALLOW_COPY_AND_ASSIGN(ModeIndicatorController); |
| 42 }; |
| 43 |
| 44 } // namespace input_method |
| 45 } // namespace chromeos |
| 46 |
| 47 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_MODE_INDICATOR_CONTROLLER_H_ |
OLD | NEW |