| 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 "ash/ime/candidate_window_view.h" | 10 #include "ash/ime/candidate_window_view.h" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 : public CandidateWindowController, | 40 : public CandidateWindowController, |
| 41 public ash::ime::CandidateWindowView::Observer, | 41 public ash::ime::CandidateWindowView::Observer, |
| 42 public views::WidgetObserver, | 42 public views::WidgetObserver, |
| 43 public IMECandidateWindowHandlerInterface { | 43 public IMECandidateWindowHandlerInterface { |
| 44 public: | 44 public: |
| 45 CandidateWindowControllerImpl(); | 45 CandidateWindowControllerImpl(); |
| 46 virtual ~CandidateWindowControllerImpl(); | 46 virtual ~CandidateWindowControllerImpl(); |
| 47 | 47 |
| 48 // CandidateWindowController overrides: | 48 // CandidateWindowController overrides: |
| 49 virtual void AddObserver( | 49 virtual void AddObserver( |
| 50 CandidateWindowController::Observer* observer) OVERRIDE; | 50 CandidateWindowController::Observer* observer) override; |
| 51 virtual void RemoveObserver( | 51 virtual void RemoveObserver( |
| 52 CandidateWindowController::Observer* observer) OVERRIDE; | 52 CandidateWindowController::Observer* observer) override; |
| 53 virtual void Hide() OVERRIDE; | 53 virtual void Hide() override; |
| 54 | 54 |
| 55 protected: | 55 protected: |
| 56 static void ConvertLookupTableToInfolistEntry( | 56 static void ConvertLookupTableToInfolistEntry( |
| 57 const ui::CandidateWindow& candidate_window, | 57 const ui::CandidateWindow& candidate_window, |
| 58 std::vector<ui::InfolistEntry>* infolist_entries, | 58 std::vector<ui::InfolistEntry>* infolist_entries, |
| 59 bool* has_highlighted); | 59 bool* has_highlighted); |
| 60 | 60 |
| 61 private: | 61 private: |
| 62 // ash::ime::CandidateWindowView::Observer implementation. | 62 // ash::ime::CandidateWindowView::Observer implementation. |
| 63 virtual void OnCandidateCommitted(int index) OVERRIDE; | 63 virtual void OnCandidateCommitted(int index) override; |
| 64 | 64 |
| 65 // views::WidgetObserver implementation. | 65 // views::WidgetObserver implementation. |
| 66 virtual void OnWidgetClosing(views::Widget* widget) OVERRIDE; | 66 virtual void OnWidgetClosing(views::Widget* widget) override; |
| 67 | 67 |
| 68 // IMECandidateWindowHandlerInterface implementation. | 68 // IMECandidateWindowHandlerInterface implementation. |
| 69 virtual void SetCursorBounds(const gfx::Rect& cursor_bounds, | 69 virtual void SetCursorBounds(const gfx::Rect& cursor_bounds, |
| 70 const gfx::Rect& composition_head) OVERRIDE; | 70 const gfx::Rect& composition_head) override; |
| 71 virtual void UpdateLookupTable( | 71 virtual void UpdateLookupTable( |
| 72 const ui::CandidateWindow& candidate_window, | 72 const ui::CandidateWindow& candidate_window, |
| 73 bool visible) OVERRIDE; | 73 bool visible) override; |
| 74 virtual void UpdatePreeditText(const base::string16& text, | 74 virtual void UpdatePreeditText(const base::string16& text, |
| 75 unsigned int cursor, bool visible) OVERRIDE; | 75 unsigned int cursor, bool visible) override; |
| 76 virtual void FocusStateChanged(bool is_focused) OVERRIDE; | 76 virtual void FocusStateChanged(bool is_focused) override; |
| 77 | 77 |
| 78 void InitCandidateWindowView(); | 78 void InitCandidateWindowView(); |
| 79 | 79 |
| 80 // The candidate window view. | 80 // The candidate window view. |
| 81 ash::ime::CandidateWindowView* candidate_window_view_; | 81 ash::ime::CandidateWindowView* candidate_window_view_; |
| 82 | 82 |
| 83 // This is the outer frame of the infolist window view. Owned by the widget. | 83 // This is the outer frame of the infolist window view. Owned by the widget. |
| 84 ash::ime::InfolistWindow* infolist_window_; | 84 ash::ime::InfolistWindow* infolist_window_; |
| 85 | 85 |
| 86 gfx::Rect cursor_bounds_; | 86 gfx::Rect cursor_bounds_; |
| 87 gfx::Rect composition_head_; | 87 gfx::Rect composition_head_; |
| 88 | 88 |
| 89 // This is the controller of the IME mode indicator. | 89 // This is the controller of the IME mode indicator. |
| 90 scoped_ptr<ModeIndicatorController> mode_indicator_controller_; | 90 scoped_ptr<ModeIndicatorController> mode_indicator_controller_; |
| 91 | 91 |
| 92 // The infolist entries and its focused index which currently shown in | 92 // The infolist entries and its focused index which currently shown in |
| 93 // Infolist window. | 93 // Infolist window. |
| 94 std::vector<ui::InfolistEntry> latest_infolist_entries_; | 94 std::vector<ui::InfolistEntry> latest_infolist_entries_; |
| 95 | 95 |
| 96 ObserverList<CandidateWindowController::Observer> observers_; | 96 ObserverList<CandidateWindowController::Observer> observers_; |
| 97 | 97 |
| 98 DISALLOW_COPY_AND_ASSIGN(CandidateWindowControllerImpl); | 98 DISALLOW_COPY_AND_ASSIGN(CandidateWindowControllerImpl); |
| 99 }; | 99 }; |
| 100 | 100 |
| 101 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_CANDIDATE_WINDOW_CONTROLLER_IMPL
_H_ | 101 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_CANDIDATE_WINDOW_CONTROLLER_IMPL
_H_ |
| 102 | 102 |
| 103 } // namespace input_method | 103 } // namespace input_method |
| 104 } // namespace chromeos | 104 } // namespace chromeos |
| OLD | NEW |