Drive: Add BatchableRequest subclass.
[chromium-blink-merge.git] / ui / base / ime / text_input_focus_manager.cc
blob25033d8cb32d4200547f775822ff426e8014425c
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "ui/base/ime/text_input_focus_manager.h"
7 #include "base/logging.h"
8 #include "base/memory/singleton.h"
10 namespace ui {
12 // TODO(sky): reenable these DCHECKs. We're in the process of enabling usage
13 // of views from multiple threads and this causes problems. See
14 // http://crbug.com/388045 for details.
16 TextInputFocusManager* TextInputFocusManager::GetInstance() {
17 TextInputFocusManager* instance = Singleton<TextInputFocusManager>::get();
18 // DCHECK(instance->thread_checker_.CalledOnValidThread());
19 return instance;
22 TextInputClient* TextInputFocusManager::GetFocusedTextInputClient() {
23 // DCHECK(thread_checker_.CalledOnValidThread());
24 return focused_text_input_client_;
27 void TextInputFocusManager::FocusTextInputClient(
28 TextInputClient* text_input_client) {
29 // DCHECK(thread_checker_.CalledOnValidThread());
30 focused_text_input_client_ = text_input_client;
33 void TextInputFocusManager::BlurTextInputClient(
34 TextInputClient* text_input_client) {
35 // DCHECK(thread_checker_.CalledOnValidThread());
36 if (focused_text_input_client_ == text_input_client)
37 focused_text_input_client_ = NULL;
40 TextInputFocusManager::TextInputFocusManager()
41 : focused_text_input_client_(NULL) {}
43 TextInputFocusManager::~TextInputFocusManager() {}
45 } // namespace ui