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

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

Issue 23615013: Completes crrev.com/23478020 and makes sure of detachment from IME. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 3 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') | ui/views/ime/input_method_bridge.cc » ('j') | 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 <msctf.h> 5 #include <msctf.h>
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 OnTextInputTypeChanged(client); 255 OnTextInputTypeChanged(client);
256 } 256 }
257 257
258 void TSFBridgeDelegate::RemoveFocusedClient(TextInputClient* client) { 258 void TSFBridgeDelegate::RemoveFocusedClient(TextInputClient* client) {
259 DCHECK_EQ(base::MessageLoop::TYPE_UI, base::MessageLoop::current()->type()); 259 DCHECK_EQ(base::MessageLoop::TYPE_UI, base::MessageLoop::current()->type());
260 DCHECK(IsInitialized()); 260 DCHECK(IsInitialized());
261 if (client_ != client) 261 if (client_ != client)
262 return; 262 return;
263 client_ = NULL; 263 client_ = NULL;
264 for (TSFDocumentMap::iterator it = tsf_document_map_.begin(); 264 for (TSFDocumentMap::iterator it = tsf_document_map_.begin();
265 it != tsf_document_map_.end(); ++it) { 265 it != tsf_document_map_.end(); ++it) {
266 if (it->second.text_store.get() == NULL) 266 if (it->second.text_store.get() == NULL)
267 continue; 267 continue;
268 it->second.text_store->SetFocusedTextInputClient(NULL, NULL); 268 it->second.text_store->SetFocusedTextInputClient(NULL, NULL);
269 } 269 }
270 } 270 }
271 271
272 TextInputClient* TSFBridgeDelegate::GetFocusedTextInputClient() const { 272 TextInputClient* TSFBridgeDelegate::GetFocusedTextInputClient() const {
273 return client_; 273 return client_;
274 } 274 }
275 275
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
488 return delegate; 488 return delegate;
489 } 489 }
490 490
491 // static 491 // static
492 void TSFBridge::Finalize(void* data) { 492 void TSFBridge::Finalize(void* data) {
493 TSFBridgeDelegate* delegate = static_cast<TSFBridgeDelegate*>(data); 493 TSFBridgeDelegate* delegate = static_cast<TSFBridgeDelegate*>(data);
494 delete delegate; 494 delete delegate;
495 } 495 }
496 496
497 } // namespace ui 497 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/ime/input_method_tsf.cc ('k') | ui/views/ime/input_method_bridge.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698