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

Side by Side Diff: chrome/browser/chromeos/login/user_image_view.cc

Issue 8113031: Change std::wstring to string16 for views::Label and views::Link (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 9 years, 2 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
OLDNEW
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 "chrome/browser/chromeos/login/user_image_view.h" 5 #include "chrome/browser/chromeos/login/user_image_view.h"
6 6
7 #include <string>
8
7 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
8 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
9 #include "chrome/browser/chromeos/login/default_images_view.h" 11 #include "chrome/browser/chromeos/login/default_images_view.h"
10 #include "chrome/browser/chromeos/login/default_user_images.h" 12 #include "chrome/browser/chromeos/login/default_user_images.h"
11 #include "chrome/browser/chromeos/login/helper.h" 13 #include "chrome/browser/chromeos/login/helper.h"
12 #include "chrome/browser/chromeos/login/rounded_rect_painter.h" 14 #include "chrome/browser/chromeos/login/rounded_rect_painter.h"
13 #include "chrome/browser/chromeos/login/user_manager.h" 15 #include "chrome/browser/chromeos/login/user_manager.h"
14 #include "chrome/browser/policy/browser_policy_connector.h" 16 #include "chrome/browser/policy/browser_policy_connector.h"
15 #include "grit/generated_resources.h" 17 #include "grit/generated_resources.h"
16 #include "grit/theme_resources.h" 18 #include "grit/theme_resources.h"
(...skipping 23 matching lines...) Expand all
40 const int kVerticalPadding = 10; 42 const int kVerticalPadding = 10;
41 // Color for splitter separating contents from OK button. 43 // Color for splitter separating contents from OK button.
42 const SkColor kSplitterColor = SkColorSetRGB(187, 195, 200); 44 const SkColor kSplitterColor = SkColorSetRGB(187, 195, 200);
43 // Height for the splitter. 45 // Height for the splitter.
44 const int kSplitterHeight = 1; 46 const int kSplitterHeight = 1;
45 47
46 // IDs of column sets for grid layout manager. 48 // IDs of column sets for grid layout manager.
47 enum ColumnSets { 49 enum ColumnSets {
48 kTitleRow, // Column set for screen title. 50 kTitleRow, // Column set for screen title.
49 kImagesRow, // Column set for image from camera and snapshot button. 51 kImagesRow, // Column set for image from camera and snapshot button.
50 kSplitterRow, // Place for the splitter. 52 kSplitterRow, // Place for the splitter.
51 kButtonsRow, // Column set for OK button. 53 kButtonsRow, // Column set for OK button.
52 }; 54 };
53 55
54 views::View* CreateSplitter(const SkColor& color) { 56 views::View* CreateSplitter(const SkColor& color) {
55 views::View* splitter = new views::View(); 57 views::View* splitter = new views::View();
56 splitter->set_background(views::Background::CreateSolidBackground(color)); 58 splitter->set_background(views::Background::CreateSolidBackground(color));
57 return splitter; 59 return splitter;
58 } 60 }
59 61
60 } // namespace 62 } // namespace
(...skipping 12 matching lines...) Expand all
73 UserImageView::~UserImageView() { 75 UserImageView::~UserImageView() {
74 } 76 }
75 77
76 void UserImageView::Init() { 78 void UserImageView::Init() {
77 // Use rounded rect background. 79 // Use rounded rect background.
78 set_border(CreateWizardBorder(&BorderDefinition::kScreenBorder)); 80 set_border(CreateWizardBorder(&BorderDefinition::kScreenBorder));
79 views::Painter* painter = CreateWizardPainter( 81 views::Painter* painter = CreateWizardPainter(
80 &BorderDefinition::kScreenBorder); 82 &BorderDefinition::kScreenBorder);
81 set_background(views::Background::CreateBackgroundPainter(true, painter)); 83 set_background(views::Background::CreateBackgroundPainter(true, painter));
82 84
83 title_label_ = new views::Label(UTF16ToWide( 85 title_label_ = new views::Label(
84 l10n_util::GetStringUTF16(IDS_OPTIONS_CHANGE_PICTURE_DIALOG_TEXT))); 86 l10n_util::GetStringUTF16(IDS_OPTIONS_CHANGE_PICTURE_DIALOG_TEXT));
85 title_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); 87 title_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
86 title_label_->SetMultiLine(true); 88 title_label_->SetMultiLine(true);
87 CorrectLabelFontSize(title_label_); 89 CorrectLabelFontSize(title_label_);
88 90
89 default_images_view_ = new DefaultImagesView(this); 91 default_images_view_ = new DefaultImagesView(this);
90 take_photo_view_ = new TakePhotoView(this); 92 take_photo_view_ = new TakePhotoView(this);
91 take_photo_view_->set_show_title(false); 93 take_photo_view_->set_show_title(false);
92 94
93 splitter_ = CreateSplitter(kSplitterColor); 95 splitter_ = CreateSplitter(kSplitterColor);
94 96
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 return; 286 return;
285 delegate_->StopCamera(); 287 delegate_->StopCamera();
286 ok_button_->SetEnabled(true); 288 ok_button_->SetEnabled(true);
287 ok_button_->RequestFocus(); 289 ok_button_->RequestFocus();
288 take_photo_view_->SetImage( 290 take_photo_view_->SetImage(
289 ResourceBundle::GetSharedInstance().GetBitmapNamed( 291 ResourceBundle::GetSharedInstance().GetBitmapNamed(
290 kDefaultImageResources[image_index])); 292 kDefaultImageResources[image_index]));
291 } 293 }
292 294
293 } // namespace chromeos 295 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/user_controller.cc ('k') | chrome/browser/chromeos/login/user_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698