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 #ifndef CHROME_BROWSER_CHROMEOS_INPUT_METHOD_CANDIDATE_WINDOW_CONTROLLER_IMPL_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_INPUT_METHOD_CANDIDATE_WINDOW_CONTROLLER_IMPL_H_ |
6 #define CHROME_BROWSER_CHROMEOS_INPUT_METHOD_CANDIDATE_WINDOW_CONTROLLER_IMPL_H_ | 6 #define CHROME_BROWSER_CHROMEOS_INPUT_METHOD_CANDIDATE_WINDOW_CONTROLLER_IMPL_H_ |
7 | 7 |
8 #include "chrome/browser/chromeos/input_method/candidate_window_controller.h" | 8 #include "chrome/browser/chromeos/input_method/candidate_window_controller.h" |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "base/observer_list.h" | 11 #include "base/observer_list.h" |
12 #include "chrome/browser/chromeos/input_method/candidate_window_view.h" | 12 #include "chrome/browser/chromeos/input_method/candidate_window_view.h" |
| 13 #include "chrome/browser/chromeos/input_method/ibus_controller.h" |
13 #include "chrome/browser/chromeos/input_method/infolist_window_view.h" | 14 #include "chrome/browser/chromeos/input_method/infolist_window_view.h" |
14 | 15 |
15 namespace views { | 16 namespace views { |
16 class Widget; | 17 class Widget; |
17 } // namespace views | 18 } // namespace views |
18 | 19 |
19 namespace chromeos { | 20 namespace chromeos { |
20 namespace input_method { | 21 namespace input_method { |
21 | 22 |
22 class DelayableWidget; | 23 class DelayableWidget; |
23 | 24 |
24 // The implementation of CandidateWindowController. | 25 // The implementation of CandidateWindowController. |
25 // CandidateWindowController controls the CandidateWindow. | 26 // CandidateWindowController controls the CandidateWindow. |
26 class CandidateWindowControllerImpl : public CandidateWindowController, | 27 class CandidateWindowControllerImpl : public CandidateWindowController, |
27 public CandidateWindowView::Observer, | 28 public CandidateWindowView::Observer, |
28 public IBusUiController::Observer { | 29 public IBusUiController::Observer, |
| 30 public IBusController::Observer { |
29 public: | 31 public: |
30 CandidateWindowControllerImpl(); | 32 CandidateWindowControllerImpl(); |
31 virtual ~CandidateWindowControllerImpl(); | 33 virtual ~CandidateWindowControllerImpl(); |
32 | 34 |
33 // Initializes the candidate window. Returns true on success. | 35 // Initializes the candidate window. Returns true on success. |
34 virtual bool Init() OVERRIDE; | 36 virtual bool Init() OVERRIDE; |
35 | 37 |
36 virtual void AddObserver( | 38 virtual void AddObserver( |
37 CandidateWindowController::Observer* observer) OVERRIDE; | 39 CandidateWindowController::Observer* observer) OVERRIDE; |
38 virtual void RemoveObserver( | 40 virtual void RemoveObserver( |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 virtual void OnHideLookupTable() OVERRIDE; | 82 virtual void OnHideLookupTable() OVERRIDE; |
81 virtual void OnHidePreeditText() OVERRIDE; | 83 virtual void OnHidePreeditText() OVERRIDE; |
82 virtual void OnSetCursorLocation(const gfx::Rect& cursor_position, | 84 virtual void OnSetCursorLocation(const gfx::Rect& cursor_position, |
83 const gfx::Rect& composition_head) OVERRIDE; | 85 const gfx::Rect& composition_head) OVERRIDE; |
84 virtual void OnUpdateAuxiliaryText(const std::string& utf8_text, | 86 virtual void OnUpdateAuxiliaryText(const std::string& utf8_text, |
85 bool visible) OVERRIDE; | 87 bool visible) OVERRIDE; |
86 virtual void OnUpdateLookupTable( | 88 virtual void OnUpdateLookupTable( |
87 const InputMethodLookupTable& lookup_table) OVERRIDE; | 89 const InputMethodLookupTable& lookup_table) OVERRIDE; |
88 virtual void OnUpdatePreeditText(const std::string& utf8_text, | 90 virtual void OnUpdatePreeditText(const std::string& utf8_text, |
89 unsigned int cursor, bool visible) OVERRIDE; | 91 unsigned int cursor, bool visible) OVERRIDE; |
90 virtual void OnConnectionChange(bool connected) OVERRIDE; | 92 |
| 93 // IBusController::Observer override |
| 94 virtual void PropertyChanged() OVERRIDE; |
| 95 virtual void OnConnected() OVERRIDE; |
| 96 virtual void OnDisconnected() OVERRIDE; |
91 | 97 |
92 // Updates infolist bounds, if current bounds is up-to-date, this function | 98 // Updates infolist bounds, if current bounds is up-to-date, this function |
93 // does nothing. | 99 // does nothing. |
94 void UpdateInfolistBounds(); | 100 void UpdateInfolistBounds(); |
95 | 101 |
96 // The controller is used for communicating with the IBus daemon. | 102 // The controller is used for communicating with the IBus daemon. |
97 scoped_ptr<IBusUiController> ibus_ui_controller_; | 103 scoped_ptr<IBusUiController> ibus_ui_controller_; |
98 | 104 |
99 // The candidate window view. | 105 // The candidate window view. |
100 CandidateWindowView* candidate_window_; | 106 CandidateWindowView* candidate_window_; |
(...skipping 13 matching lines...) Expand all Loading... |
114 | 120 |
115 ObserverList<CandidateWindowController::Observer> observers_; | 121 ObserverList<CandidateWindowController::Observer> observers_; |
116 | 122 |
117 DISALLOW_COPY_AND_ASSIGN(CandidateWindowControllerImpl); | 123 DISALLOW_COPY_AND_ASSIGN(CandidateWindowControllerImpl); |
118 }; | 124 }; |
119 | 125 |
120 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_CANDIDATE_WINDOW_CONTROLLER_IMPL
_H_ | 126 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_CANDIDATE_WINDOW_CONTROLLER_IMPL
_H_ |
121 | 127 |
122 } // namespace input_method | 128 } // namespace input_method |
123 } // namespace chromeos | 129 } // namespace chromeos |
OLD | NEW |