Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(276)

Side by Side Diff: ui/views/examples/label_example.cc

Issue 102993018: Remove UTF string conversion functions from the global namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: aaaaaaaaaa Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/views/corewm/tooltip_aura_unittest.cc ('k') | ui/views/examples/textfield_example.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/examples/label_example.h" 5 #include "ui/views/examples/label_example.h"
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "ui/views/border.h" 8 #include "ui/views/border.h"
9 #include "ui/views/controls/label.h" 9 #include "ui/views/controls/label.h"
10 #include "ui/views/layout/box_layout.h" 10 #include "ui/views/layout/box_layout.h"
11 #include "ui/views/view.h" 11 #include "ui/views/view.h"
12 12
13 using base::ASCIIToUTF16; 13 using base::ASCIIToUTF16;
14 using base::WideToUTF16;
14 15
15 namespace views { 16 namespace views {
16 namespace examples { 17 namespace examples {
17 18
18 namespace { 19 namespace {
19 20
20 // A Label with a constrained preferred size to demonstrate eliding or wrapping. 21 // A Label with a constrained preferred size to demonstrate eliding or wrapping.
21 class PreferredSizeLabel : public Label { 22 class PreferredSizeLabel : public Label {
22 public: 23 public:
23 PreferredSizeLabel(); 24 PreferredSizeLabel();
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 79
79 label = new PreferredSizeLabel(); 80 label = new PreferredSizeLabel();
80 label->SetText(ASCIIToUTF16("A multi-line label will wrap onto subsequent " 81 label->SetText(ASCIIToUTF16("A multi-line label will wrap onto subsequent "
81 "lines if the text's width exceeds the label's available width.")); 82 "lines if the text's width exceeds the label's available width."));
82 label->SetMultiLine(true); 83 label->SetMultiLine(true);
83 container->AddChildView(label); 84 container->AddChildView(label);
84 } 85 }
85 86
86 } // namespace examples 87 } // namespace examples
87 } // namespace views 88 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/corewm/tooltip_aura_unittest.cc ('k') | ui/views/examples/textfield_example.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698