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

Side by Side Diff: chrome/browser/input_method/input_method_engine_base.cc

Issue 1590863002: Move the local struct definitions off ui/base/ime. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 | « chrome/browser/input_method/input_method_engine_base.h ('k') | ui/base/ime/BUILD.gn » ('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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "chrome/browser/input_method/input_method_engine_base.h" 5 #include "chrome/browser/input_method/input_method_engine_base.h"
6 6
7 #undef FocusIn 7 #undef FocusIn
8 #undef FocusOut 8 #undef FocusOut
9 #undef RootWindow 9 #undef RootWindow
10 #include <algorithm> 10 #include <algorithm>
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 ext_event->caps_lock = event.IsCapsLockOn(); 161 ext_event->caps_lock = event.IsCapsLockOn();
162 #if defined(OS_CHROMEOS) 162 #if defined(OS_CHROMEOS)
163 ext_event->key = GetKeyFromEvent(event); 163 ext_event->key = GetKeyFromEvent(event);
164 #else 164 #else
165 ext_event->key = ui::KeycodeConverter::DomKeyToKeyString(event.GetDomKey()); 165 ext_event->key = ui::KeycodeConverter::DomKeyToKeyString(event.GetDomKey());
166 #endif // defined(OS_CHROMEOS) 166 #endif // defined(OS_CHROMEOS)
167 } 167 }
168 168
169 } // namespace 169 } // namespace
170 170
171 InputMethodEngineBase::KeyboardEvent::KeyboardEvent()
172 : alt_key(false), ctrl_key(false), shift_key(false), caps_lock(false) {}
173
174 InputMethodEngineBase::KeyboardEvent::~KeyboardEvent() {}
175
171 InputMethodEngineBase::InputMethodEngineBase() 176 InputMethodEngineBase::InputMethodEngineBase()
172 : current_input_type_(ui::TEXT_INPUT_TYPE_NONE), 177 : current_input_type_(ui::TEXT_INPUT_TYPE_NONE),
173 context_id_(0), 178 context_id_(0),
174 next_context_id_(1), 179 next_context_id_(1),
175 composition_text_(new ui::CompositionText()), 180 composition_text_(new ui::CompositionText()),
176 composition_cursor_(0), 181 composition_cursor_(0),
177 sent_key_event_(NULL), 182 sent_key_event_(NULL),
178 profile_(NULL) {} 183 profile_(NULL) {}
179 184
180 InputMethodEngineBase::~InputMethodEngineBase() {} 185 InputMethodEngineBase::~InputMethodEngineBase() {}
181 186
182 void InputMethodEngineBase::Initialize( 187 void InputMethodEngineBase::Initialize(
183 scoped_ptr<ui::IMEEngineObserver> observer, 188 scoped_ptr<InputMethodEngineBase::Observer> observer,
184 const char* extension_id, 189 const char* extension_id,
185 Profile* profile) { 190 Profile* profile) {
186 DCHECK(observer) << "Observer must not be null."; 191 DCHECK(observer) << "Observer must not be null.";
187 192
188 // TODO(komatsu): It is probably better to set observer out of Initialize. 193 // TODO(komatsu): It is probably better to set observer out of Initialize.
189 observer_ = std::move(observer); 194 observer_ = std::move(observer);
190 extension_id_ = extension_id; 195 extension_id_ = extension_id;
191 profile_ = profile; 196 profile_ = profile;
192 } 197 }
193 198
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 void InputMethodEngineBase::SetSurroundingText(const std::string& text, 395 void InputMethodEngineBase::SetSurroundingText(const std::string& text,
391 uint32_t cursor_pos, 396 uint32_t cursor_pos,
392 uint32_t anchor_pos, 397 uint32_t anchor_pos,
393 uint32_t offset_pos) { 398 uint32_t offset_pos) {
394 observer_->OnSurroundingTextChanged( 399 observer_->OnSurroundingTextChanged(
395 active_component_id_, text, static_cast<int>(cursor_pos), 400 active_component_id_, text, static_cast<int>(cursor_pos),
396 static_cast<int>(anchor_pos), static_cast<int>(offset_pos)); 401 static_cast<int>(anchor_pos), static_cast<int>(offset_pos));
397 } 402 }
398 403
399 } // namespace input_method 404 } // namespace input_method
OLDNEW
« no previous file with comments | « chrome/browser/input_method/input_method_engine_base.h ('k') | ui/base/ime/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698