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

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: Synced. 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() {}
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698