| 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" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 // |has_highlighted| to true if infolist_entries contains highlighted entry. | 48 // |has_highlighted| to true if infolist_entries contains highlighted entry. |
| 49 // TODO(mukai): move this method (and tests) to the new InfolistEntry model. | 49 // TODO(mukai): move this method (and tests) to the new InfolistEntry model. |
| 50 static void ConvertLookupTableToInfolistEntry( | 50 static void ConvertLookupTableToInfolistEntry( |
| 51 const CandidateWindow& candidate_window, | 51 const CandidateWindow& candidate_window, |
| 52 std::vector<InfolistEntry>* infolist_entries, | 52 std::vector<InfolistEntry>* infolist_entries, |
| 53 bool* has_highlighted); | 53 bool* has_highlighted); |
| 54 | 54 |
| 55 private: | 55 private: |
| 56 // CandidateWindowView::Observer implementation. | 56 // CandidateWindowView::Observer implementation. |
| 57 virtual void OnCandidateCommitted(int index) OVERRIDE; | 57 virtual void OnCandidateCommitted(int index) OVERRIDE; |
| 58 virtual void OnCandidateWindowOpened() OVERRIDE; | |
| 59 virtual void OnCandidateWindowClosed() OVERRIDE; | |
| 60 | 58 |
| 61 // views::WidgetObserver implementation. | 59 // views::WidgetObserver implementation. |
| 62 virtual void OnWidgetClosing(views::Widget* widget) OVERRIDE; | 60 virtual void OnWidgetClosing(views::Widget* widget) OVERRIDE; |
| 63 | 61 |
| 64 // IBusPanelCandidateWindowHandlerInterface implementation. | 62 // IBusPanelCandidateWindowHandlerInterface implementation. |
| 65 virtual void SetCursorBounds(const gfx::Rect& cursor_bounds, | 63 virtual void SetCursorBounds(const gfx::Rect& cursor_bounds, |
| 66 const gfx::Rect& composition_head) OVERRIDE; | 64 const gfx::Rect& composition_head) OVERRIDE; |
| 67 virtual void UpdateLookupTable(const CandidateWindow& candidate_window, | 65 virtual void UpdateLookupTable(const CandidateWindow& candidate_window, |
| 68 bool visible) OVERRIDE; | 66 bool visible) OVERRIDE; |
| 69 virtual void UpdatePreeditText(const std::string& utf8_text, | 67 virtual void UpdatePreeditText(const std::string& utf8_text, |
| 70 unsigned int cursor, bool visible) OVERRIDE; | 68 unsigned int cursor, bool visible) OVERRIDE; |
| 71 virtual void FocusStateChanged(bool is_focused) OVERRIDE; | 69 virtual void FocusStateChanged(bool is_focused) OVERRIDE; |
| 72 | 70 |
| 73 // Creates the candidate window view. | 71 void InitCandidateWindowView(); |
| 74 void CreateView(); | |
| 75 | 72 |
| 76 // The candidate window view. | 73 // The candidate window view. |
| 77 CandidateWindowView* candidate_window_view_; | 74 CandidateWindowView* candidate_window_view_; |
| 78 | 75 |
| 79 // This is the outer frame of the candidate window view. The frame will | |
| 80 // own |candidate_window_|. | |
| 81 scoped_ptr<views::Widget> frame_; | |
| 82 | |
| 83 // This is the outer frame of the infolist window view. Owned by the widget. | 76 // This is the outer frame of the infolist window view. Owned by the widget. |
| 84 InfolistWindow* infolist_window_; | 77 InfolistWindow* infolist_window_; |
| 85 | 78 |
| 79 gfx::Rect cursor_bounds_; |
| 80 gfx::Rect composition_head_; |
| 81 |
| 86 // This is the controller of the IME mode indicator. | 82 // This is the controller of the IME mode indicator. |
| 87 scoped_ptr<ModeIndicatorController> mode_indicator_controller_; | 83 scoped_ptr<ModeIndicatorController> mode_indicator_controller_; |
| 88 | 84 |
| 89 // The infolist entries and its focused index which currently shown in | 85 // The infolist entries and its focused index which currently shown in |
| 90 // Infolist window. | 86 // Infolist window. |
| 91 std::vector<InfolistEntry> latest_infolist_entries_; | 87 std::vector<InfolistEntry> latest_infolist_entries_; |
| 92 | 88 |
| 93 ObserverList<CandidateWindowController::Observer> observers_; | 89 ObserverList<CandidateWindowController::Observer> observers_; |
| 94 | 90 |
| 95 DISALLOW_COPY_AND_ASSIGN(CandidateWindowControllerImpl); | 91 DISALLOW_COPY_AND_ASSIGN(CandidateWindowControllerImpl); |
| 96 }; | 92 }; |
| 97 | 93 |
| 98 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_CANDIDATE_WINDOW_CONTROLLER_IMPL
_H_ | 94 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_CANDIDATE_WINDOW_CONTROLLER_IMPL
_H_ |
| 99 | 95 |
| 100 } // namespace input_method | 96 } // namespace input_method |
| 101 } // namespace chromeos | 97 } // namespace chromeos |
| OLD | NEW |