OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "views/controls/textfield/textfield.h" | 5 #include "views/controls/textfield/textfield.h" |
6 | 6 |
7 #if defined(OS_LINUX) | 7 #if defined(OS_LINUX) |
8 #include <gdk/gdkkeysyms.h> | 8 #include <gdk/gdkkeysyms.h> |
9 #endif | 9 #endif |
10 | 10 |
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 void Textfield::SelectRange(const ui::Range& range) { | 254 void Textfield::SelectRange(const ui::Range& range) { |
255 DCHECK(native_wrapper_); | 255 DCHECK(native_wrapper_); |
256 native_wrapper_->SelectRange(range); | 256 native_wrapper_->SelectRange(range); |
257 } | 257 } |
258 | 258 |
259 size_t Textfield::GetCursorPosition() const { | 259 size_t Textfield::GetCursorPosition() const { |
260 DCHECK(native_wrapper_); | 260 DCHECK(native_wrapper_); |
261 return native_wrapper_->GetCursorPosition(); | 261 return native_wrapper_->GetCursorPosition(); |
262 } | 262 } |
263 | 263 |
264 TextStyle* Textfield::CreateTextStyle() { | 264 void Textfield::ApplyStyleRange(const gfx::StyleRange& style) { |
265 DCHECK(native_wrapper_); | 265 DCHECK(native_wrapper_); |
266 return native_wrapper_->CreateTextStyle(); | 266 return native_wrapper_->ApplyStyleRange(style); |
267 } | 267 } |
268 | 268 |
269 void Textfield::ApplyTextStyle(const TextStyle* style, | 269 void Textfield::ApplyDefaultStyle() { |
270 const ui::Range& range) { | |
271 DCHECK(native_wrapper_); | 270 DCHECK(native_wrapper_); |
272 return native_wrapper_->ApplyTextStyle(style, range); | 271 native_wrapper_->ApplyDefaultStyle(); |
273 } | |
274 | |
275 void Textfield::ClearAllTextStyles() { | |
276 DCHECK(native_wrapper_); | |
277 native_wrapper_->ClearAllTextStyles(); | |
278 } | 272 } |
279 | 273 |
280 void Textfield::ClearEditHistory() { | 274 void Textfield::ClearEditHistory() { |
281 DCHECK(native_wrapper_); | 275 DCHECK(native_wrapper_); |
282 native_wrapper_->ClearEditHistory(); | 276 native_wrapper_->ClearEditHistory(); |
283 } | 277 } |
284 | 278 |
285 void Textfield::SetAccessibleName(const string16& name) { | 279 void Textfield::SetAccessibleName(const string16& name) { |
286 accessible_name_ = name; | 280 accessible_name_ = name; |
287 } | 281 } |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
415 } | 409 } |
416 #endif | 410 #endif |
417 } | 411 } |
418 } | 412 } |
419 | 413 |
420 std::string Textfield::GetClassName() const { | 414 std::string Textfield::GetClassName() const { |
421 return kViewClassName; | 415 return kViewClassName; |
422 } | 416 } |
423 | 417 |
424 } // namespace views | 418 } // namespace views |
OLD | NEW |