Index: chrome/browser/chromeos/input_method/mode_indicator_controller.h |
diff --git a/chrome/browser/chromeos/input_method/mode_indicator_controller.h b/chrome/browser/chromeos/input_method/mode_indicator_controller.h |
index 0f1e3037ae02fc3427f633f2da888a9ed2ef15c1..f6ab8cbd63c57d0bdb3284bd7e0c874b933998f8 100644 |
--- a/chrome/browser/chromeos/input_method/mode_indicator_controller.h |
+++ b/chrome/browser/chromeos/input_method/mode_indicator_controller.h |
@@ -7,23 +7,20 @@ |
#include "base/memory/scoped_ptr.h" |
#include "chromeos/ime/input_method_manager.h" |
- |
-namespace gfx { |
-class Rect; |
-} // namespace gfx |
+#include "ui/gfx/rect.h" |
namespace chromeos { |
namespace input_method { |
-class ModeIndicatorWidget; |
+class ModeIndicatorObserver; |
-// ModeIndicatorController is the controller of ModeIndicatiorWidget on the |
-// MVC model. |
+// ModeIndicatorController is the controller of ModeIndicatiorDelegateView |
+// on the MVC model. |
class ModeIndicatorController |
: public InputMethodManager::Observer { |
public: |
// This class takes the ownership of |mi_widget|. |
- explicit ModeIndicatorController(ModeIndicatorWidget* mi_widget); |
+ explicit ModeIndicatorController(InputMethodManager* imm); |
virtual ~ModeIndicatorController(); |
// Set cursor bounds, which is the base point to display this indicator. |
@@ -41,13 +38,20 @@ class ModeIndicatorController |
// Show the mode inidicator with the current ime's short name if all |
// the conditions are cleared. |
- void ShowModeIndicator(InputMethodManager* manager); |
+ void ShowModeIndicator(); |
+ |
+ InputMethodManager* imm_; |
- scoped_ptr<ModeIndicatorWidget> mi_widget_; |
+ // Cursor bounds representing the anchor rect of the mode indicator. |
+ gfx::Rect cursor_bounds_; |
// True on a text field is focused. |
bool is_focused_; |
+ // Observer of the widgets created by BubbleDelegateView. This is used to |
+ // close the previous widget when a new widget is created. |
+ scoped_ptr<ModeIndicatorObserver> mi_observer_; |
+ |
DISALLOW_COPY_AND_ASSIGN(ModeIndicatorController); |
}; |