| 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 <cstring> | 5 #include <cstring> |
| 6 | 6 |
| 7 #include "base/i18n/char_iterator.h" | 7 #include "base/i18n/char_iterator.h" |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
| 10 #include "chromeos/dbus/dbus_thread_manager.h" | 10 #include "chromeos/dbus/dbus_thread_manager.h" |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 virtual bool GetSelectionRange(Range* range) OVERRIDE { return false; } | 207 virtual bool GetSelectionRange(Range* range) OVERRIDE { return false; } |
| 208 virtual bool SetSelectionRange(const Range& range) OVERRIDE { return false; } | 208 virtual bool SetSelectionRange(const Range& range) OVERRIDE { return false; } |
| 209 virtual bool DeleteRange(const Range& range) OVERRIDE { return false; } | 209 virtual bool DeleteRange(const Range& range) OVERRIDE { return false; } |
| 210 virtual bool GetTextFromRange(const Range& range, | 210 virtual bool GetTextFromRange(const Range& range, |
| 211 string16* text) OVERRIDE { return false; } | 211 string16* text) OVERRIDE { return false; } |
| 212 virtual void OnInputMethodChanged() OVERRIDE { | 212 virtual void OnInputMethodChanged() OVERRIDE { |
| 213 ++on_input_method_changed_call_count_; | 213 ++on_input_method_changed_call_count_; |
| 214 } | 214 } |
| 215 virtual bool ChangeTextDirectionAndLayoutAlignment( | 215 virtual bool ChangeTextDirectionAndLayoutAlignment( |
| 216 base::i18n::TextDirection direction) OVERRIDE { return false; } | 216 base::i18n::TextDirection direction) OVERRIDE { return false; } |
| 217 virtual void ExtendSelectionAndDelete(int before, int after) OVERRIDE { } |
| 217 | 218 |
| 218 bool HasNativeEvent() const { | 219 bool HasNativeEvent() const { |
| 219 base::NativeEvent empty; | 220 base::NativeEvent empty; |
| 220 std::memset(&empty, 0, sizeof(empty)); | 221 std::memset(&empty, 0, sizeof(empty)); |
| 221 return !!std::memcmp(&dispatched_native_event_, | 222 return !!std::memcmp(&dispatched_native_event_, |
| 222 &empty, | 223 &empty, |
| 223 sizeof(dispatched_native_event_)); | 224 sizeof(dispatched_native_event_)); |
| 224 } | 225 } |
| 225 | 226 |
| 226 void ResetFlags() { | 227 void ResetFlags() { |
| (...skipping 660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 887 composition_text.underlines[0].start_offset); | 888 composition_text.underlines[0].start_offset); |
| 888 EXPECT_EQ(GetOffsetInUTF16(kSampleText, selection.end_index), | 889 EXPECT_EQ(GetOffsetInUTF16(kSampleText, selection.end_index), |
| 889 composition_text.underlines[0].end_offset); | 890 composition_text.underlines[0].end_offset); |
| 890 EXPECT_EQ(SK_ColorBLACK, composition_text.underlines[0].color); | 891 EXPECT_EQ(SK_ColorBLACK, composition_text.underlines[0].color); |
| 891 EXPECT_TRUE(composition_text.underlines[0].thick); | 892 EXPECT_TRUE(composition_text.underlines[0].thick); |
| 892 } | 893 } |
| 893 | 894 |
| 894 // TODO(nona): Write more tests, especially for key event functions. | 895 // TODO(nona): Write more tests, especially for key event functions. |
| 895 | 896 |
| 896 } // namespace ui | 897 } // namespace ui |
| OLD | NEW |