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..c4ea97180cdfd2ca60f576e371cfcfefe059ffa6 100644 |
--- a/chrome/browser/chromeos/input_method/mode_indicator_controller.h |
+++ b/chrome/browser/chromeos/input_method/mode_indicator_controller.h |
@@ -7,15 +7,12 @@ |
#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. |
@@ -23,7 +20,7 @@ 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); |
}; |