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 "chrome/browser/chromeos/input_method/ibus_ui_controller.h" | 8 #include "chrome/browser/chromeos/input_method/ibus_ui_controller.h" |
9 #include "views/view.h" | 9 #include "views/view.h" |
10 | 10 |
(...skipping 11 matching lines...) Expand all Loading... |
22 class Observer { | 22 class Observer { |
23 public: | 23 public: |
24 virtual ~Observer() {} | 24 virtual ~Observer() {} |
25 // The function is called when a candidate is committed. | 25 // The function is called when a candidate is committed. |
26 // See comments at NotifyCandidateClicked() in chromeos_input_method_ui.h | 26 // See comments at NotifyCandidateClicked() in chromeos_input_method_ui.h |
27 // for details about the parameters. | 27 // for details about the parameters. |
28 virtual void OnCandidateCommitted(int index, int button, int flag) = 0; | 28 virtual void OnCandidateCommitted(int index, int button, int flag) = 0; |
29 }; | 29 }; |
30 | 30 |
31 explicit CandidateWindowView(views::Widget* parent_frame); | 31 explicit CandidateWindowView(views::Widget* parent_frame); |
32 virtual ~CandidateWindowView() {} | 32 virtual ~CandidateWindowView(); |
33 void Init(); | 33 void Init(); |
34 | 34 |
35 // Adds the given observer. The ownership is not transferred. | 35 // Adds the given observer. The ownership is not transferred. |
36 void AddObserver(Observer* observer) { | 36 void AddObserver(Observer* observer) { |
37 observers_.AddObserver(observer); | 37 observers_.AddObserver(observer); |
38 } | 38 } |
39 | 39 |
40 // Removes the given observer. | 40 // Removes the given observer. |
41 void RemoveObserver(Observer* observer) { | 41 void RemoveObserver(Observer* observer) { |
42 observers_.RemoveObserver(observer); | 42 observers_.RemoveObserver(observer); |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 // The last cursor location. | 177 // The last cursor location. |
178 gfx::Rect cursor_location_; | 178 gfx::Rect cursor_location_; |
179 | 179 |
180 DISALLOW_COPY_AND_ASSIGN(CandidateWindowView); | 180 DISALLOW_COPY_AND_ASSIGN(CandidateWindowView); |
181 }; | 181 }; |
182 | 182 |
183 } // namespace input_method | 183 } // namespace input_method |
184 } // namespace chromeos | 184 } // namespace chromeos |
185 | 185 |
186 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_CANDIDATE_WINDOW_VIEW_H_ | 186 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_CANDIDATE_WINDOW_VIEW_H_ |
OLD | NEW |