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

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

Issue 889323003: Split ui/base/ime into a new component (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix cros x11 GN build Created 5 years, 10 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
« no previous file with comments | « ui/base/ime/text_input_client.h ('k') | ui/base/ime/ui_base_ime.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_BASE_IME_TEXT_INPUT_FOCUS_MANAGER_H_ 5 #ifndef UI_BASE_IME_TEXT_INPUT_FOCUS_MANAGER_H_
6 #define UI_BASE_IME_TEXT_INPUT_FOCUS_MANAGER_H_ 6 #define UI_BASE_IME_TEXT_INPUT_FOCUS_MANAGER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/threading/thread_checker.h" 9 #include "base/threading/thread_checker.h"
10 #include "ui/base/ui_base_export.h" 10 #include "ui/base/ime/ui_base_ime_export.h"
11 11
12 template <typename T> struct DefaultSingletonTraits; 12 template <typename T> struct DefaultSingletonTraits;
13 13
14 namespace ui { 14 namespace ui {
15 15
16 class TextInputClient; 16 class TextInputClient;
17 17
18 // Manages the focused TextInputClient across windows and their contents. 18 // Manages the focused TextInputClient across windows and their contents.
19 class UI_BASE_EXPORT TextInputFocusManager { 19 class UI_BASE_IME_EXPORT TextInputFocusManager {
20 public: 20 public:
21 static TextInputFocusManager* GetInstance(); 21 static TextInputFocusManager* GetInstance();
22 22
23 // Returns the currently focused text input client or NULL. 23 // Returns the currently focused text input client or NULL.
24 TextInputClient* GetFocusedTextInputClient(); 24 TextInputClient* GetFocusedTextInputClient();
25 25
26 // Changes the text input focus to |text_input_client|. 26 // Changes the text input focus to |text_input_client|.
27 void FocusTextInputClient(TextInputClient* text_input_client); 27 void FocusTextInputClient(TextInputClient* text_input_client);
28 28
29 // Removes the text input focus from |text_input_client|. If 29 // Removes the text input focus from |text_input_client|. If
30 // |text_input_client| was not focused, does nothing. 30 // |text_input_client| was not focused, does nothing.
31 void BlurTextInputClient(TextInputClient* text_input_client); 31 void BlurTextInputClient(TextInputClient* text_input_client);
32 32
33 private: 33 private:
34 friend struct DefaultSingletonTraits<TextInputFocusManager>; 34 friend struct DefaultSingletonTraits<TextInputFocusManager>;
35 35
36 TextInputFocusManager(); 36 TextInputFocusManager();
37 ~TextInputFocusManager(); 37 ~TextInputFocusManager();
38 38
39 TextInputClient* focused_text_input_client_; 39 TextInputClient* focused_text_input_client_;
40 base::ThreadChecker thread_checker_; 40 base::ThreadChecker thread_checker_;
41 41
42 DISALLOW_COPY_AND_ASSIGN(TextInputFocusManager); 42 DISALLOW_COPY_AND_ASSIGN(TextInputFocusManager);
43 }; 43 };
44 44
45 } // namespace ui 45 } // namespace ui
46 46
47 #endif // UI_BASE_IME_TEXT_INPUT_FOCUS_MANAGER_H_ 47 #endif // UI_BASE_IME_TEXT_INPUT_FOCUS_MANAGER_H_
OLDNEW
« no previous file with comments | « ui/base/ime/text_input_client.h ('k') | ui/base/ime/ui_base_ime.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698