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

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

Issue 23751002: Add InputMethod::GetTextInputMode (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add comment Created 7 years, 3 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.h ('k') | ui/base/ime/mock_input_method.h » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "ui/base/ime/input_method_base.h" 5 #include "ui/base/ime/input_method_base.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "ui/base/ime/input_method_delegate.h" 8 #include "ui/base/ime/input_method_delegate.h"
9 #include "ui/base/ime/input_method_observer.h" 9 #include "ui/base/ime/input_method_observer.h"
10 #include "ui/base/ime/text_input_client.h" 10 #include "ui/base/ime/text_input_client.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 if (!IsTextInputClientFocused(client)) 60 if (!IsTextInputClientFocused(client))
61 return; 61 return;
62 NotifyTextInputStateChanged(client); 62 NotifyTextInputStateChanged(client);
63 } 63 }
64 64
65 TextInputType InputMethodBase::GetTextInputType() const { 65 TextInputType InputMethodBase::GetTextInputType() const {
66 TextInputClient* client = GetTextInputClient(); 66 TextInputClient* client = GetTextInputClient();
67 return client ? client->GetTextInputType() : TEXT_INPUT_TYPE_NONE; 67 return client ? client->GetTextInputType() : TEXT_INPUT_TYPE_NONE;
68 } 68 }
69 69
70 TextInputMode InputMethodBase::GetTextInputMode() const {
71 TextInputClient* client = GetTextInputClient();
72 return client ? client->GetTextInputMode() : TEXT_INPUT_MODE_DEFAULT;
73 }
74
70 bool InputMethodBase::CanComposeInline() const { 75 bool InputMethodBase::CanComposeInline() const {
71 TextInputClient* client = GetTextInputClient(); 76 TextInputClient* client = GetTextInputClient();
72 return client ? client->CanComposeInline() : true; 77 return client ? client->CanComposeInline() : true;
73 } 78 }
74 79
75 void InputMethodBase::AddObserver(InputMethodObserver* observer) { 80 void InputMethodBase::AddObserver(InputMethodObserver* observer) {
76 observer_list_.AddObserver(observer); 81 observer_list_.AddObserver(observer);
77 } 82 }
78 83
79 void InputMethodBase::RemoveObserver(InputMethodObserver* observer) { 84 void InputMethodBase::RemoveObserver(InputMethodObserver* observer) {
(...skipping 27 matching lines...) Expand all
107 } 112 }
108 113
109 void InputMethodBase::NotifyTextInputStateChanged( 114 void InputMethodBase::NotifyTextInputStateChanged(
110 const TextInputClient* client) { 115 const TextInputClient* client) {
111 FOR_EACH_OBSERVER(InputMethodObserver, 116 FOR_EACH_OBSERVER(InputMethodObserver,
112 observer_list_, 117 observer_list_,
113 OnTextInputStateChanged(client)); 118 OnTextInputStateChanged(client));
114 } 119 }
115 120
116 } // namespace ui 121 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/ime/input_method_base.h ('k') | ui/base/ime/mock_input_method.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698