OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef CHROME_BROWSER_CHROMEOS_INPUT_METHOD_MODE_INDICATOR_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_INPUT_METHOD_MODE_INDICATOR_CONTROLLER_H_ |
6 #define CHROME_BROWSER_CHROMEOS_INPUT_METHOD_MODE_INDICATOR_CONTROLLER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_INPUT_METHOD_MODE_INDICATOR_CONTROLLER_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "chromeos/ime/input_method_manager.h" | 9 #include "chromeos/ime/input_method_manager.h" |
10 #include "ui/gfx/rect.h" | 10 #include "ui/gfx/rect.h" |
(...skipping 30 matching lines...) Expand all Loading... |
41 // Accessor of the widget observer for testing. The caller keeps the | 41 // Accessor of the widget observer for testing. The caller keeps the |
42 // ownership of the observer object. | 42 // ownership of the observer object. |
43 static void SetModeIndicatorObserverForTesting( | 43 static void SetModeIndicatorObserverForTesting( |
44 ModeIndicatorObserverInterface* observer); | 44 ModeIndicatorObserverInterface* observer); |
45 static ModeIndicatorObserverInterface* GetModeIndicatorObserverForTesting(); | 45 static ModeIndicatorObserverInterface* GetModeIndicatorObserverForTesting(); |
46 | 46 |
47 private: | 47 private: |
48 // InputMethodManager::Observer implementation. | 48 // InputMethodManager::Observer implementation. |
49 virtual void InputMethodChanged(InputMethodManager* manager, | 49 virtual void InputMethodChanged(InputMethodManager* manager, |
50 bool show_message) OVERRIDE; | 50 bool show_message) OVERRIDE; |
51 virtual void InputMethodPropertyChanged(InputMethodManager* manager) OVERRIDE; | |
52 | 51 |
53 // Show the mode inidicator with the current ime's short name if all | 52 // Show the mode inidicator with the current ime's short name if all |
54 // the conditions are cleared. | 53 // the conditions are cleared. |
55 void ShowModeIndicator(); | 54 void ShowModeIndicator(); |
56 | 55 |
57 InputMethodManager* imm_; | 56 InputMethodManager* imm_; |
58 | 57 |
59 // Cursor bounds representing the anchor rect of the mode indicator. | 58 // Cursor bounds representing the anchor rect of the mode indicator. |
60 gfx::Rect cursor_bounds_; | 59 gfx::Rect cursor_bounds_; |
61 | 60 |
62 // True on a text field is focused. | 61 // True on a text field is focused. |
63 bool is_focused_; | 62 bool is_focused_; |
64 | 63 |
65 // Observer of the widgets created by BubbleDelegateView. This is used to | 64 // Observer of the widgets created by BubbleDelegateView. This is used to |
66 // close the previous widget when a new widget is created. | 65 // close the previous widget when a new widget is created. |
67 scoped_ptr<ModeIndicatorObserverInterface> mi_observer_; | 66 scoped_ptr<ModeIndicatorObserverInterface> mi_observer_; |
68 | 67 |
69 DISALLOW_COPY_AND_ASSIGN(ModeIndicatorController); | 68 DISALLOW_COPY_AND_ASSIGN(ModeIndicatorController); |
70 }; | 69 }; |
71 | 70 |
72 } // namespace input_method | 71 } // namespace input_method |
73 } // namespace chromeos | 72 } // namespace chromeos |
74 | 73 |
75 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_MODE_INDICATOR_CONTROLLER_H_ | 74 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_MODE_INDICATOR_CONTROLLER_H_ |
OLD | NEW |