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 #include "chrome/browser/chromeos/input_method/candidate_window_controller_impl.
h" | 5 #include "chrome/browser/chromeos/input_method/candidate_window_controller_impl.
h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 } | 95 } |
96 | 96 |
97 CandidateWindowControllerImpl::CandidateWindowControllerImpl() | 97 CandidateWindowControllerImpl::CandidateWindowControllerImpl() |
98 : ibus_ui_controller_(new IBusUiController), | 98 : ibus_ui_controller_(new IBusUiController), |
99 candidate_window_(NULL), | 99 candidate_window_(NULL), |
100 infolist_window_(NULL), | 100 infolist_window_(NULL), |
101 latest_infolist_focused_index_(InfolistWindowView::InvalidFocusIndex()) { | 101 latest_infolist_focused_index_(InfolistWindowView::InvalidFocusIndex()) { |
102 } | 102 } |
103 | 103 |
104 CandidateWindowControllerImpl::~CandidateWindowControllerImpl() { | 104 CandidateWindowControllerImpl::~CandidateWindowControllerImpl() { |
| 105 if (DBusThreadManager::Get()->GetIBusPanelService()) |
| 106 DBusThreadManager::Get()->GetIBusPanelService()-> |
| 107 SetUpCandidateWindowHandler(NULL); |
105 ibus_ui_controller_->RemoveObserver(this); | 108 ibus_ui_controller_->RemoveObserver(this); |
106 candidate_window_->RemoveObserver(this); | 109 candidate_window_->RemoveObserver(this); |
107 // ibus_ui_controller_'s destructor will close the connection. | 110 // ibus_ui_controller_'s destructor will close the connection. |
108 } | 111 } |
109 | 112 |
110 void CandidateWindowControllerImpl::OnHideAuxiliaryText() { | 113 void CandidateWindowControllerImpl::OnHideAuxiliaryText() { |
111 candidate_window_->HideAuxiliaryText(); | 114 candidate_window_->HideAuxiliaryText(); |
112 } | 115 } |
113 | 116 |
114 void CandidateWindowControllerImpl::OnHideLookupTable() { | 117 void CandidateWindowControllerImpl::OnHideLookupTable() { |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
338 | 341 |
339 if (candidate_window_rect.y() + infolist_window_size.height() > | 342 if (candidate_window_rect.y() + infolist_window_size.height() > |
340 screen_rect.bottom()) | 343 screen_rect.bottom()) |
341 result.set_y(screen_rect.bottom() - infolist_window_size.height()); | 344 result.set_y(screen_rect.bottom() - infolist_window_size.height()); |
342 | 345 |
343 return result; | 346 return result; |
344 } | 347 } |
345 | 348 |
346 } // namespace input_method | 349 } // namespace input_method |
347 } // namespace chromeos | 350 } // namespace chromeos |
OLD | NEW |