OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_VIEW_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_INPUT_METHOD_CANDIDATE_WINDOW_VIEW_H_ |
6 #define CHROME_BROWSER_CHROMEOS_INPUT_METHOD_CANDIDATE_WINDOW_VIEW_H_ | 6 #define CHROME_BROWSER_CHROMEOS_INPUT_METHOD_CANDIDATE_WINDOW_VIEW_H_ |
7 | 7 |
| 8 #include "base/gtest_prod_util.h" |
8 #include "chrome/browser/chromeos/input_method/ibus_ui_controller.h" | 9 #include "chrome/browser/chromeos/input_method/ibus_ui_controller.h" |
9 #include "ui/views/view.h" | 10 #include "ui/views/view.h" |
10 | 11 |
11 namespace chromeos { | 12 namespace chromeos { |
12 namespace input_method { | 13 namespace input_method { |
13 | 14 |
14 class CandidateView; | 15 class CandidateView; |
15 class InformationTextArea; | 16 class InformationTextArea; |
16 class HidableArea; | 17 class HidableArea; |
17 | 18 |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 const gfx::Rect& cursor_location() const { return cursor_location_; } | 127 const gfx::Rect& cursor_location() const { return cursor_location_; } |
127 | 128 |
128 protected: | 129 protected: |
129 // Override View::VisibilityChanged() | 130 // Override View::VisibilityChanged() |
130 virtual void VisibilityChanged(View* starting_from, bool is_visible) OVERRIDE; | 131 virtual void VisibilityChanged(View* starting_from, bool is_visible) OVERRIDE; |
131 | 132 |
132 // Override View::OnBoundsChanged() | 133 // Override View::OnBoundsChanged() |
133 virtual void OnBoundsChanged(const gfx::Rect& previous_bounds) OVERRIDE; | 134 virtual void OnBoundsChanged(const gfx::Rect& previous_bounds) OVERRIDE; |
134 | 135 |
135 private: | 136 private: |
| 137 FRIEND_TEST_ALL_PREFIXES(CandidateWindowViewTest, MozcUpdateCandidateTest); |
| 138 |
136 // Initializes the candidate views if needed. | 139 // Initializes the candidate views if needed. |
137 void MaybeInitializeCandidateViews( | 140 void MaybeInitializeCandidateViews( |
138 const InputMethodLookupTable& lookup_table); | 141 const InputMethodLookupTable& lookup_table); |
139 | 142 |
140 // Returns the appropriate area (header or footer) to put auxiliary texts. | 143 // Returns the appropriate area (header or footer) to put auxiliary texts. |
141 InformationTextArea* GetAuxiliaryTextArea(); | 144 InformationTextArea* GetAuxiliaryTextArea(); |
142 | 145 |
143 // Returns true if the candidate window is open. The suggestion window does | 146 // Returns true if the candidate window is open. The suggestion window does |
144 // not count as the candidate window. | 147 // not count as the candidate window. |
145 bool IsCandidateWindowOpen() const; | 148 bool IsCandidateWindowOpen() const; |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 // send OnCandidateWindowOpened and OnCandidateWindowClosed events. | 205 // send OnCandidateWindowOpened and OnCandidateWindowClosed events. |
203 bool was_candidate_window_open_; | 206 bool was_candidate_window_open_; |
204 | 207 |
205 DISALLOW_COPY_AND_ASSIGN(CandidateWindowView); | 208 DISALLOW_COPY_AND_ASSIGN(CandidateWindowView); |
206 }; | 209 }; |
207 | 210 |
208 } // namespace input_method | 211 } // namespace input_method |
209 } // namespace chromeos | 212 } // namespace chromeos |
210 | 213 |
211 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_CANDIDATE_WINDOW_VIEW_H_ | 214 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_CANDIDATE_WINDOW_VIEW_H_ |
OLD | NEW |