Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(242)

Side by Side Diff: ui/base/ime/win/tsf_event_router.cc

Issue 22534003: Implements InputMethodTSF::IsCandidatePopupOpen(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes unittests. Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/base/ime/input_method_tsf.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/win/tsf_event_router.h" 5 #include "ui/base/ime/win/tsf_event_router.h"
6 6
7 #include <msctf.h> 7 #include <msctf.h>
8 #include <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 ui_source_->UnadviseSink(ui_source_cookie_); 186 ui_source_->UnadviseSink(ui_source_cookie_);
187 ui_source_.Release(); 187 ui_source_.Release();
188 } 188 }
189 ui_source_cookie_ = TF_INVALID_COOKIE; 189 ui_source_cookie_ = TF_INVALID_COOKIE;
190 190
191 if (!thread_manager) 191 if (!thread_manager)
192 return; 192 return;
193 193
194 base::win::ScopedComPtr<ITfDocumentMgr> document_manager; 194 base::win::ScopedComPtr<ITfDocumentMgr> document_manager;
195 if (FAILED(thread_manager->GetFocus(document_manager.Receive())) || 195 if (FAILED(thread_manager->GetFocus(document_manager.Receive())) ||
196 !document_manager.get() ||
196 FAILED(document_manager->GetBase(context_.Receive())) || 197 FAILED(document_manager->GetBase(context_.Receive())) ||
197 FAILED(context_source_.QueryFrom(context_))) 198 FAILED(context_source_.QueryFrom(context_)))
198 return; 199 return;
199 context_source_->AdviseSink(IID_ITfTextEditSink, 200 context_source_->AdviseSink(IID_ITfTextEditSink,
200 static_cast<ITfTextEditSink*>(this), 201 static_cast<ITfTextEditSink*>(this),
201 &context_source_cookie_); 202 &context_source_cookie_);
202 203
203 if (FAILED(ui_element_manager_.QueryFrom(thread_manager)) || 204 if (FAILED(ui_element_manager_.QueryFrom(thread_manager)) ||
204 FAILED(ui_source_.QueryFrom(ui_element_manager_))) 205 FAILED(ui_source_.QueryFrom(ui_element_manager_)))
205 return; 206 return;
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 298
298 void TSFEventRouter::OnTSFEndComposition() { 299 void TSFEventRouter::OnTSFEndComposition() {
299 observer_->OnTSFEndComposition(); 300 observer_->OnTSFEndComposition();
300 } 301 }
301 302
302 void TSFEventRouter::SetManager(ITfThreadMgr* thread_manager) { 303 void TSFEventRouter::SetManager(ITfThreadMgr* thread_manager) {
303 delegate_->SetManager(thread_manager); 304 delegate_->SetManager(thread_manager);
304 } 305 }
305 306
306 } // namespace ui 307 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/ime/input_method_tsf.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698