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

Side by Side Diff: ui/base/ime/text_input_focus_manager.cc

Issue 173803002: Redesigns the text input focus handling. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed review comments. Created 6 years, 9 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 | Annotate | Revision Log
OLDNEW
(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::GetInstance() {
12 return Singleton<TextInputFocusManager>::get();
13 }
14
15 TextInputClient* TextInputFocusManager::GetFocusedTextInputClient() {
16 return focused_text_input_client_;
17 }
18
19 void TextInputFocusManager::FocusTextInputClient(
20 TextInputClient* text_input_client) {
21 focused_text_input_client_ = text_input_client;
22 }
23
24 void TextInputFocusManager::BlurTextInputClient(
25 TextInputClient* text_input_client) {
26 if (focused_text_input_client_ == text_input_client)
27 focused_text_input_client_ = NULL;
28 }
29
30 TextInputFocusManager::TextInputFocusManager()
31 : focused_text_input_client_(NULL) {}
32
33 TextInputFocusManager::~TextInputFocusManager() {}
34
35 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698