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

Unified Diff: ash/system/logout_button/logout_button_tray.cc

Issue 145033006: views: Make View::set_border() take a scoped_ptr<>. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to ToT 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/system/ime/tray_ime.cc ('k') | ash/system/logout_button/logout_confirmation_dialog_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/logout_button/logout_button_tray.cc
diff --git a/ash/system/logout_button/logout_button_tray.cc b/ash/system/logout_button/logout_button_tray.cc
index c5e3a3b24919f5f1c646568b4c45d04543261db9..2e55fcbc5f77531ebff0da3a9e73311563803bf4 100644
--- a/ash/system/logout_button/logout_button_tray.cc
+++ b/ash/system/logout_button/logout_button_tray.cc
@@ -88,8 +88,8 @@ LogoutButton::LogoutButton(views::ButtonListener* listener)
for (size_t state = 0; state < views::Button::STATE_COUNT; ++state)
SetTextColor(static_cast<views::Button::ButtonState>(state), SK_ColorWHITE);
- views::LabelButtonBorder* border =
- new views::LabelButtonBorder(views::Button::STYLE_TEXTBUTTON);
+ scoped_ptr<views::LabelButtonBorder> border(
+ new views::LabelButtonBorder(views::Button::STYLE_TEXTBUTTON));
border->SetPainter(false, views::Button::STATE_NORMAL,
views::Painter::CreateImageGridPainter(kLogoutButtonNormalImages));
border->SetPainter(false, views::Button::STATE_HOVERED,
@@ -100,7 +100,7 @@ LogoutButton::LogoutButton(views::ButtonListener* listener)
insets += gfx::Insets(0, kLogoutButtonHorizontalExtraPadding,
0, kLogoutButtonHorizontalExtraPadding);
border->set_insets(insets);
- set_border(border);
+ SetBorder(border.PassAs<views::Border>());
set_animate_on_state_change(false);
set_min_size(gfx::Size(0, GetShelfItemHeight()));
@@ -133,7 +133,7 @@ LogoutButtonTray::LogoutButtonTray(StatusAreaWidget* status_area_widget)
confirmation_delegate_(new LogoutConfirmationDialogDelegate) {
button_ = new LogoutButton(this);
tray_container()->AddChildView(button_);
- tray_container()->set_border(NULL);
+ tray_container()->SetBorder(views::Border::NullBorder());
// The Shell may not exist in some unit tests.
if (Shell::HasInstance()) {
Shell::GetInstance()->system_tray_notifier()->
@@ -169,7 +169,7 @@ void LogoutButtonTray::EnsureConfirmationDialogIsClosed() {
void LogoutButtonTray::SetShelfAlignment(ShelfAlignment alignment) {
TrayBackgroundView::SetShelfAlignment(alignment);
- tray_container()->set_border(NULL);
+ tray_container()->SetBorder(views::Border::NullBorder());
}
base::string16 LogoutButtonTray::GetAccessibleNameForTray() {
« no previous file with comments | « ash/system/ime/tray_ime.cc ('k') | ash/system/logout_button/logout_confirmation_dialog_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698