| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/examples/multiline_example.h" | 5 #include "ui/views/examples/multiline_example.h" |
| 6 | 6 |
| 7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
| 8 #include "ui/events/event.h" | 8 #include "ui/events/event.h" |
| 9 #include "ui/gfx/render_text.h" | 9 #include "ui/gfx/render_text.h" |
| 10 #include "ui/views/background.h" | 10 #include "ui/views/background.h" |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 container()->SchedulePaint(); | 149 container()->SchedulePaint(); |
| 150 } | 150 } |
| 151 | 151 |
| 152 bool MultilineExample::HandleKeyEvent(Textfield* sender, | 152 bool MultilineExample::HandleKeyEvent(Textfield* sender, |
| 153 const ui::KeyEvent& key_event) { | 153 const ui::KeyEvent& key_event) { |
| 154 return false; | 154 return false; |
| 155 } | 155 } |
| 156 | 156 |
| 157 void MultilineExample::ButtonPressed(Button* sender, const ui::Event& event) { | 157 void MultilineExample::ButtonPressed(Button* sender, const ui::Event& event) { |
| 158 DCHECK_EQ(sender, label_checkbox_); | 158 DCHECK_EQ(sender, label_checkbox_); |
| 159 label_->SetText(label_checkbox_->checked() ? textfield_->text() : | 159 label_->SetText(label_checkbox_->checked() ? textfield_->GetText() : |
| 160 base::string16()); | 160 base::string16()); |
| 161 container()->Layout(); | 161 container()->Layout(); |
| 162 container()->SchedulePaint(); | 162 container()->SchedulePaint(); |
| 163 } | 163 } |
| 164 | 164 |
| 165 } // namespace examples | 165 } // namespace examples |
| 166 } // namespace views | 166 } // namespace views |
| OLD | NEW |