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

Side by Side Diff: chrome/browser/ui/views/extensions/extension_uninstall_dialog_view.cc

Issue 1154383004: Allow character breaks for the extension name on uninstallation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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
« no previous file with comments | « no previous file | no next file » | 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 "chrome/browser/extensions/extension_uninstall_dialog.h" 5 #include "chrome/browser/extensions/extension_uninstall_dialog.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 if (size.width() > kIconSize || size.height() > kIconSize) 172 if (size.width() > kIconSize || size.height() > kIconSize)
173 size = gfx::Size(kIconSize, kIconSize); 173 size = gfx::Size(kIconSize, kIconSize);
174 icon_ = new views::ImageView(); 174 icon_ = new views::ImageView();
175 icon_->SetImageSize(size); 175 icon_->SetImageSize(size);
176 icon_->SetImage(*image); 176 icon_->SetImage(*image);
177 AddChildView(icon_); 177 AddChildView(icon_);
178 178
179 heading_ = new views::Label(base::UTF8ToUTF16(dialog_->GetHeadingText())); 179 heading_ = new views::Label(base::UTF8ToUTF16(dialog_->GetHeadingText()));
180 heading_->SetMultiLine(true); 180 heading_->SetMultiLine(true);
181 heading_->SetHorizontalAlignment(gfx::ALIGN_LEFT); 181 heading_->SetHorizontalAlignment(gfx::ALIGN_LEFT);
182 heading_->SetAllowCharacterBreak(true);
182 AddChildView(heading_); 183 AddChildView(heading_);
183 } 184 }
184 185
185 ExtensionUninstallDialogDelegateView::~ExtensionUninstallDialogDelegateView() { 186 ExtensionUninstallDialogDelegateView::~ExtensionUninstallDialogDelegateView() {
186 // If we're here, 2 things could have happened. Either the user closed the 187 // If we're here, 2 things could have happened. Either the user closed the
187 // dialog nicely and one of ExtensionUninstallAccepted or 188 // dialog nicely and one of ExtensionUninstallAccepted or
188 // ExtensionUninstallCanceled has been called (in which case dialog_ will be 189 // ExtensionUninstallCanceled has been called (in which case dialog_ will be
189 // NULL), *or* neither of them have been called and we are being forced closed 190 // NULL), *or* neither of them have been called and we are being forced closed
190 // by our parent widget. In this case, we need to make sure to notify dialog_ 191 // by our parent widget. In this case, we need to make sure to notify dialog_
191 // not to call us again, since we're about to be freed by the Widget 192 // not to call us again, since we're about to be freed by the Widget
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 275
275 } // namespace 276 } // namespace
276 277
277 // static 278 // static
278 extensions::ExtensionUninstallDialog* 279 extensions::ExtensionUninstallDialog*
279 extensions::ExtensionUninstallDialog::Create(Profile* profile, 280 extensions::ExtensionUninstallDialog::Create(Profile* profile,
280 gfx::NativeWindow parent, 281 gfx::NativeWindow parent,
281 Delegate* delegate) { 282 Delegate* delegate) {
282 return new ExtensionUninstallDialogViews(profile, parent, delegate); 283 return new ExtensionUninstallDialogViews(profile, parent, delegate);
283 } 284 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698