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

Side by Side Diff: chrome/browser/ui/views/extensions/extension_uninstall_dialog_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 "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/compiler_specific.h" 6 #include "base/compiler_specific.h"
7 #include "base/string_util.h" 7 #include "base/string_util.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/browser/extensions/extension_uninstall_dialog.h" 9 #include "chrome/browser/extensions/extension_uninstall_dialog.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 : dialog_(dialog_view) { 142 : dialog_(dialog_view) {
143 // Scale down to icon size, but allow smaller icons (don't scale up). 143 // Scale down to icon size, but allow smaller icons (don't scale up).
144 gfx::Size size(icon->width(), icon->height()); 144 gfx::Size size(icon->width(), icon->height());
145 if (size.width() > kIconSize || size.height() > kIconSize) 145 if (size.width() > kIconSize || size.height() > kIconSize)
146 size = gfx::Size(kIconSize, kIconSize); 146 size = gfx::Size(kIconSize, kIconSize);
147 icon_ = new views::ImageView(); 147 icon_ = new views::ImageView();
148 icon_->SetImageSize(size); 148 icon_->SetImageSize(size);
149 icon_->SetImage(*icon); 149 icon_->SetImage(*icon);
150 AddChildView(icon_); 150 AddChildView(icon_);
151 151
152 heading_ = new views::Label(UTF16ToWide( 152 heading_ = new views::Label(
153 l10n_util::GetStringFUTF16(IDS_EXTENSION_UNINSTALL_PROMPT_HEADING, 153 l10n_util::GetStringFUTF16(IDS_EXTENSION_UNINSTALL_PROMPT_HEADING,
154 UTF8ToUTF16(extension->name())))); 154 UTF8ToUTF16(extension->name())));
155 heading_->SetMultiLine(true); 155 heading_->SetMultiLine(true);
156 AddChildView(heading_); 156 AddChildView(heading_);
157 } 157 }
158 158
159 ExtensionUninstallDialogDelegateView::~ExtensionUninstallDialogDelegateView() { 159 ExtensionUninstallDialogDelegateView::~ExtensionUninstallDialogDelegateView() {
160 } 160 }
161 161
162 std::wstring ExtensionUninstallDialogDelegateView::GetDialogButtonLabel( 162 std::wstring ExtensionUninstallDialogDelegateView::GetDialogButtonLabel(
163 MessageBoxFlags::DialogButton button) const { 163 MessageBoxFlags::DialogButton button) const {
164 switch (button) { 164 switch (button) {
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 } 228 }
229 } 229 }
230 230
231 } // namespace 231 } // namespace
232 232
233 // static 233 // static
234 ExtensionUninstallDialog* ExtensionUninstallDialog::Create( 234 ExtensionUninstallDialog* ExtensionUninstallDialog::Create(
235 Profile* profile, Delegate* delegate) { 235 Profile* profile, Delegate* delegate) {
236 return new ExtensionUninstallDialogViews(profile, delegate); 236 return new ExtensionUninstallDialogViews(profile, delegate);
237 } 237 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/extensions/extension_installed_bubble.cc ('k') | chrome/browser/ui/views/external_protocol_dialog.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698