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 "ui/views/controls/textfield/textfield.h" | 5 #include "ui/views/controls/textfield/textfield.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/trace_event/trace_event.h" | 10 #include "base/trace_event/trace_event.h" |
(...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
553 SchedulePaint(); | 553 SchedulePaint(); |
554 } | 554 } |
555 | 555 |
556 void Textfield::ApplyStyle(gfx::TextStyle style, | 556 void Textfield::ApplyStyle(gfx::TextStyle style, |
557 bool value, | 557 bool value, |
558 const gfx::Range& range) { | 558 const gfx::Range& range) { |
559 GetRenderText()->ApplyStyle(style, value, range); | 559 GetRenderText()->ApplyStyle(style, value, range); |
560 SchedulePaint(); | 560 SchedulePaint(); |
561 } | 561 } |
562 | 562 |
| 563 void Textfield::SetWeight(gfx::Font::Weight weight) { |
| 564 GetRenderText()->SetWeight(weight); |
| 565 SchedulePaint(); |
| 566 } |
| 567 |
| 568 void Textfield::ApplyWeight(gfx::Font::Weight weight, const gfx::Range& range) { |
| 569 GetRenderText()->ApplyWeight(weight, range); |
| 570 SchedulePaint(); |
| 571 } |
| 572 |
563 void Textfield::ClearEditHistory() { | 573 void Textfield::ClearEditHistory() { |
564 model_->ClearEditHistory(); | 574 model_->ClearEditHistory(); |
565 } | 575 } |
566 | 576 |
567 void Textfield::SetAccessibleName(const base::string16& name) { | 577 void Textfield::SetAccessibleName(const base::string16& name) { |
568 accessible_name_ = name; | 578 accessible_name_ = name; |
569 } | 579 } |
570 | 580 |
571 void Textfield::ExecuteCommand(int command_id) { | 581 void Textfield::ExecuteCommand(int command_id) { |
572 ExecuteCommand(command_id, ui::EF_NONE); | 582 ExecuteCommand(command_id, ui::EF_NONE); |
(...skipping 1328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1901 RequestFocus(); | 1911 RequestFocus(); |
1902 model_->MoveCursorTo(mouse); | 1912 model_->MoveCursorTo(mouse); |
1903 if (!selection_clipboard_text.empty()) { | 1913 if (!selection_clipboard_text.empty()) { |
1904 model_->InsertText(selection_clipboard_text); | 1914 model_->InsertText(selection_clipboard_text); |
1905 UpdateAfterChange(true, true); | 1915 UpdateAfterChange(true, true); |
1906 } | 1916 } |
1907 OnAfterUserAction(); | 1917 OnAfterUserAction(); |
1908 } | 1918 } |
1909 | 1919 |
1910 } // namespace views | 1920 } // namespace views |
OLD | NEW |