Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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. | |
| 4 | |
| 5 #include "ui/base/ime/text_input_focus_manager.h" | |
| 6 | |
| 7 #include "base/memory/singleton.h" | |
| 8 | |
| 9 namespace ui { | |
| 10 | |
| 11 TextInputFocusManager::~TextInputFocusManager() {} | |
| 12 | |
| 13 TextInputFocusManager* TextInputFocusManager::GetInstance() { | |
| 14 return Singleton<TextInputFocusManager>::get(); | |
| 15 } | |
| 16 | |
| 17 TextInputClient* TextInputFocusManager::GetFocusedTextInputClient() { | |
| 18 return focused_text_input_client_; | |
| 19 } | |
| 20 | |
| 21 void TextInputFocusManager::SetFocusedTextInputClient( | |
| 22 TextInputClient* text_input_client) { | |
| 23 focused_text_input_client_ = text_input_client; | |
| 24 } | |
| 25 | |
| 26 void TextInputFocusManager::UnsetFocusedTextInputClient( | |
|
msw
2014/03/11 00:58:50
Is this function even necessary? A call could easi
Yuki
2014/03/11 15:27:37
What the client would like to say is "forget me.
msw
2014/03/11 23:24:37
I'm on the fence about this, but I'll concede to y
| |
| 27 TextInputClient* text_input_client) { | |
| 28 if (focused_text_input_client_ == text_input_client) | |
| 29 focused_text_input_client_ = NULL; | |
| 30 } | |
| 31 | |
| 32 TextInputFocusManager::TextInputFocusManager() | |
| 33 : focused_text_input_client_(NULL) {} | |
| 34 | |
| 35 } // namespace ui | |
| OLD | NEW |