| OLD | NEW |
| 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 <X11/Xlib.h> | 5 #include <X11/Xlib.h> |
| 6 #undef Bool | 6 #undef Bool |
| 7 #undef FocusIn | 7 #undef FocusIn |
| 8 #undef FocusOut | 8 #undef FocusOut |
| 9 #undef None | 9 #undef None |
| 10 | 10 |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 virtual void ConfirmCompositionText() OVERRIDE { | 252 virtual void ConfirmCompositionText() OVERRIDE { |
| 253 confirmed_text_ = composition_text_; | 253 confirmed_text_ = composition_text_; |
| 254 composition_text_.Clear(); | 254 composition_text_.Clear(); |
| 255 } | 255 } |
| 256 virtual void ClearCompositionText() OVERRIDE { | 256 virtual void ClearCompositionText() OVERRIDE { |
| 257 composition_text_.Clear(); | 257 composition_text_.Clear(); |
| 258 } | 258 } |
| 259 virtual void InsertText(const base::string16& text) OVERRIDE { | 259 virtual void InsertText(const base::string16& text) OVERRIDE { |
| 260 inserted_text_ = text; | 260 inserted_text_ = text; |
| 261 } | 261 } |
| 262 virtual void InsertChar(char16 ch, int flags) OVERRIDE { | 262 virtual void InsertChar(base::char16 ch, int flags) OVERRIDE { |
| 263 inserted_char_ = ch; | 263 inserted_char_ = ch; |
| 264 inserted_char_flags_ = flags; | 264 inserted_char_flags_ = flags; |
| 265 } | 265 } |
| 266 virtual gfx::NativeWindow GetAttachedWindow() const OVERRIDE { | 266 virtual gfx::NativeWindow GetAttachedWindow() const OVERRIDE { |
| 267 return static_cast<gfx::NativeWindow>(NULL); | 267 return static_cast<gfx::NativeWindow>(NULL); |
| 268 } | 268 } |
| 269 virtual TextInputType GetTextInputType() const OVERRIDE { | 269 virtual TextInputType GetTextInputType() const OVERRIDE { |
| 270 return input_type_; | 270 return input_type_; |
| 271 } | 271 } |
| 272 virtual TextInputMode GetTextInputMode() const OVERRIDE { | 272 virtual TextInputMode GetTextInputMode() const OVERRIDE { |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 352 base::NativeEvent dispatched_native_event_; | 352 base::NativeEvent dispatched_native_event_; |
| 353 ui::EventType dispatched_fabricated_event_type_; | 353 ui::EventType dispatched_fabricated_event_type_; |
| 354 ui::KeyboardCode dispatched_fabricated_event_key_code_; | 354 ui::KeyboardCode dispatched_fabricated_event_key_code_; |
| 355 int dispatched_fabricated_event_flags_; | 355 int dispatched_fabricated_event_flags_; |
| 356 | 356 |
| 357 // Variables for remembering the parameters that are passed to | 357 // Variables for remembering the parameters that are passed to |
| 358 // ui::TextInputClient functions. | 358 // ui::TextInputClient functions. |
| 359 CompositionText composition_text_; | 359 CompositionText composition_text_; |
| 360 CompositionText confirmed_text_; | 360 CompositionText confirmed_text_; |
| 361 base::string16 inserted_text_; | 361 base::string16 inserted_text_; |
| 362 char16 inserted_char_; | 362 base::char16 inserted_char_; |
| 363 unsigned int on_input_method_changed_call_count_; | 363 unsigned int on_input_method_changed_call_count_; |
| 364 int inserted_char_flags_; | 364 int inserted_char_flags_; |
| 365 | 365 |
| 366 // Variables that will be returned from the ui::TextInputClient functions. | 366 // Variables that will be returned from the ui::TextInputClient functions. |
| 367 TextInputType input_type_; | 367 TextInputType input_type_; |
| 368 TextInputMode input_mode_; | 368 TextInputMode input_mode_; |
| 369 bool can_compose_inline_; | 369 bool can_compose_inline_; |
| 370 gfx::Rect caret_bounds_; | 370 gfx::Rect caret_bounds_; |
| 371 gfx::Range text_range_; | 371 gfx::Range text_range_; |
| 372 gfx::Range selection_range_; | 372 gfx::Range selection_range_; |
| (...skipping 638 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1011 ime_->ResetContext(); | 1011 ime_->ResetContext(); |
| 1012 | 1012 |
| 1013 // Do callback. | 1013 // Do callback. |
| 1014 mock_ime_engine_handler_->last_passed_callback().Run(true); | 1014 mock_ime_engine_handler_->last_passed_callback().Run(true); |
| 1015 | 1015 |
| 1016 EXPECT_EQ(0, ime_->process_key_event_post_ime_call_count()); | 1016 EXPECT_EQ(0, ime_->process_key_event_post_ime_call_count()); |
| 1017 } | 1017 } |
| 1018 // TODO(nona): Introduce ProcessKeyEventPostIME tests(crbug.com/156593). | 1018 // TODO(nona): Introduce ProcessKeyEventPostIME tests(crbug.com/156593). |
| 1019 | 1019 |
| 1020 } // namespace ui | 1020 } // namespace ui |
| OLD | NEW |