| 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 "ui/base/ime/input_method_base.h" | 5 #include "ui/base/ime/input_method_base.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 10 #include "ui/base/ime/input_method_delegate.h" | 10 #include "ui/base/ime/input_method_delegate.h" |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 AsWeakPtr())); | 153 AsWeakPtr())); |
| 154 } | 154 } |
| 155 | 155 |
| 156 void InputMethodBase::OnCandidateWindowHidden() { | 156 void InputMethodBase::OnCandidateWindowHidden() { |
| 157 base::MessageLoop::current()->PostTask( | 157 base::MessageLoop::current()->PostTask( |
| 158 FROM_HERE, | 158 FROM_HERE, |
| 159 base::Bind(&InputMethodBase::CandidateWindowHiddenCallback, AsWeakPtr())); | 159 base::Bind(&InputMethodBase::CandidateWindowHiddenCallback, AsWeakPtr())); |
| 160 } | 160 } |
| 161 | 161 |
| 162 void InputMethodBase::CandidateWindowShownCallback() { | 162 void InputMethodBase::CandidateWindowShownCallback() { |
| 163 if (text_input_client_) | 163 if (TextInputClient* text_input_client = GetTextInputClient()) |
| 164 text_input_client_->OnCandidateWindowShown(); | 164 text_input_client->OnCandidateWindowShown(); |
| 165 } | 165 } |
| 166 | 166 |
| 167 void InputMethodBase::CandidateWindowUpdatedCallback() { | 167 void InputMethodBase::CandidateWindowUpdatedCallback() { |
| 168 if (text_input_client_) | 168 if (TextInputClient* text_input_client = GetTextInputClient()) |
| 169 text_input_client_->OnCandidateWindowUpdated(); | 169 text_input_client->OnCandidateWindowUpdated(); |
| 170 } | 170 } |
| 171 | 171 |
| 172 void InputMethodBase::CandidateWindowHiddenCallback() { | 172 void InputMethodBase::CandidateWindowHiddenCallback() { |
| 173 if (text_input_client_) | 173 if (TextInputClient* text_input_client = GetTextInputClient()) |
| 174 text_input_client_->OnCandidateWindowHidden(); | 174 text_input_client->OnCandidateWindowHidden(); |
| 175 } | 175 } |
| 176 | 176 |
| 177 } // namespace ui | 177 } // namespace ui |
| OLD | NEW |