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

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

Issue 173803002: Redesigns the text input focus handling. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Synced. Created 6 years, 7 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
« no previous file with comments | « ui/base/ime/input_method_base.cc ('k') | ui/base/ime/text_input_focus_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef UI_BASE_IME_TEXT_INPUT_FOCUS_MANAGER_H_
6 #define UI_BASE_IME_TEXT_INPUT_FOCUS_MANAGER_H_
7
8 #include "base/macros.h"
9 #include "base/threading/thread_checker.h"
10 #include "ui/base/ui_base_export.h"
11
12 template <typename T> struct DefaultSingletonTraits;
13
14 namespace ui {
15
16 class TextInputClient;
17
18 // Manages the focused TextInputClient across windows and their contents.
19 class UI_BASE_EXPORT TextInputFocusManager {
20 public:
21 static TextInputFocusManager* GetInstance();
22
23 // Returns the currently focused text input client or NULL.
24 TextInputClient* GetFocusedTextInputClient();
25
26 // Changes the text input focus to |text_input_client|.
27 void FocusTextInputClient(TextInputClient* text_input_client);
28
29 // Removes the text input focus from |text_input_client|. If
30 // |text_input_client| was not focused, does nothing.
31 void BlurTextInputClient(TextInputClient* text_input_client);
32
33 private:
34 friend struct DefaultSingletonTraits<TextInputFocusManager>;
35
36 TextInputFocusManager();
37 ~TextInputFocusManager();
38
39 TextInputClient* focused_text_input_client_;
40 base::ThreadChecker thread_checker_;
41
42 DISALLOW_COPY_AND_ASSIGN(TextInputFocusManager);
43 };
44
45 } // namespace ui
46
47 #endif // UI_BASE_IME_TEXT_INPUT_FOCUS_MANAGER_H_
OLDNEW
« no previous file with comments | « ui/base/ime/input_method_base.cc ('k') | ui/base/ime/text_input_focus_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698