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

Side by Side Diff: chrome/browser/chromeos/power/idle_action_warning_dialog_view.cc

Issue 145033006: views: Make View::set_border() take a scoped_ptr<>. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Further renaming 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/power/idle_action_warning_dialog_view.h" 5 #include "chrome/browser/chromeos/power/idle_action_warning_dialog_view.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "grit/generated_resources.h" 8 #include "grit/generated_resources.h"
9 #include "ui/aura/root_window.h" 9 #include "ui/aura/root_window.h"
10 #include "ui/base/l10n/l10n_util.h" 10 #include "ui/base/l10n/l10n_util.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 gfx::Size FixedWidthLabel::GetPreferredSize() { 50 gfx::Size FixedWidthLabel::GetPreferredSize() {
51 return gfx::Size(width_, GetHeightForWidth(width_)); 51 return gfx::Size(width_, GetHeightForWidth(width_));
52 } 52 }
53 53
54 } // namespace 54 } // namespace
55 55
56 IdleActionWarningDialogView::IdleActionWarningDialogView() : closing_(false) { 56 IdleActionWarningDialogView::IdleActionWarningDialogView() : closing_(false) {
57 FixedWidthLabel* content = new FixedWidthLabel( 57 FixedWidthLabel* content = new FixedWidthLabel(
58 l10n_util::GetStringUTF16(IDS_IDLE_WARNING_LOGOUT_WARNING), 58 l10n_util::GetStringUTF16(IDS_IDLE_WARNING_LOGOUT_WARNING),
59 kIdleActionWarningContentWidth); 59 kIdleActionWarningContentWidth);
60 content->set_border(views::Border::CreateEmptyBorder( 60 content->SetBorder(views::Border::CreateEmptyBorder(
61 views::kPanelVertMargin, views::kButtonHEdgeMarginNew, 61 views::kPanelVertMargin, views::kButtonHEdgeMarginNew,
62 views::kPanelVertMargin, views::kButtonHEdgeMarginNew)); 62 views::kPanelVertMargin, views::kButtonHEdgeMarginNew));
63 AddChildView(content); 63 AddChildView(content);
64 SetLayoutManager(new views::FillLayout()); 64 SetLayoutManager(new views::FillLayout());
65 65
66 views::DialogDelegate::CreateDialogWidget( 66 views::DialogDelegate::CreateDialogWidget(
67 this, ash::Shell::GetPrimaryRootWindow(), NULL)->Show(); 67 this, ash::Shell::GetPrimaryRootWindow(), NULL)->Show();
68 } 68 }
69 69
70 void IdleActionWarningDialogView::CloseDialog() { 70 void IdleActionWarningDialogView::CloseDialog() {
(...skipping 14 matching lines...) Expand all
85 } 85 }
86 86
87 bool IdleActionWarningDialogView::Cancel() { 87 bool IdleActionWarningDialogView::Cancel() {
88 return closing_; 88 return closing_;
89 } 89 }
90 90
91 IdleActionWarningDialogView::~IdleActionWarningDialogView() { 91 IdleActionWarningDialogView::~IdleActionWarningDialogView() {
92 } 92 }
93 93
94 } // namespace chromeos 94 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698