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

Side by Side Diff: ash/accelerators/exit_warning_handler.cc

Issue 2901503003: Rename GetPreferredSize to CalculatePreferredSize in ash/ (Closed)
Patch Set: Created 3 years, 7 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 | ash/autoclick/common/autoclick_ring_handler.cc » ('j') | ash/shell/lock_view.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "ash/accelerators/exit_warning_handler.h" 5 #include "ash/accelerators/exit_warning_handler.h"
6 6
7 #include "ash/public/cpp/shell_window_ids.h" 7 #include "ash/public/cpp/shell_window_ids.h"
8 #include "ash/root_window_controller.h" 8 #include "ash/root_window_controller.h"
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "ash/shell_delegate.h" 10 #include "ash/shell_delegate.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 label->SetHorizontalAlignment(gfx::ALIGN_CENTER); 59 label->SetHorizontalAlignment(gfx::ALIGN_CENTER);
60 label->SetFontList(font_list); 60 label->SetFontList(font_list);
61 label->SetEnabledColor(kTextColor); 61 label->SetEnabledColor(kTextColor);
62 label->SetDisabledColor(kTextColor); 62 label->SetDisabledColor(kTextColor);
63 label->SetAutoColorReadabilityEnabled(false); 63 label->SetAutoColorReadabilityEnabled(false);
64 label->SetSubpixelRenderingEnabled(false); 64 label->SetSubpixelRenderingEnabled(false);
65 AddChildView(label); 65 AddChildView(label);
66 SetLayoutManager(new views::FillLayout); 66 SetLayoutManager(new views::FillLayout);
67 } 67 }
68 68
69 gfx::Size GetPreferredSize() const override { 69 gfx::Size CalculatePreferredSize() const override {
70 return gfx::Size(width_, height_); 70 return gfx::Size(width_, height_);
71 } 71 }
72 72
73 void OnPaint(gfx::Canvas* canvas) override { 73 void OnPaint(gfx::Canvas* canvas) override {
74 cc::PaintFlags flags; 74 cc::PaintFlags flags;
75 flags.setStyle(cc::PaintFlags::kFill_Style); 75 flags.setStyle(cc::PaintFlags::kFill_Style);
76 flags.setColor(kWindowBackgroundColor); 76 flags.setColor(kWindowBackgroundColor);
77 canvas->DrawRoundRect(GetLocalBounds(), kWindowCornerRadius, flags); 77 canvas->DrawRoundRect(GetLocalBounds(), kWindowCornerRadius, flags);
78 views::WidgetDelegateView::OnPaint(canvas); 78 views::WidgetDelegateView::OnPaint(canvas);
79 } 79 }
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 widget_->Show(); 168 widget_->Show();
169 169
170 delegate->NotifyAccessibilityEvent(ui::AX_EVENT_ALERT, true); 170 delegate->NotifyAccessibilityEvent(ui::AX_EVENT_ALERT, true);
171 } 171 }
172 172
173 void ExitWarningHandler::Hide() { 173 void ExitWarningHandler::Hide() {
174 widget_.reset(); 174 widget_.reset();
175 } 175 }
176 176
177 } // namespace ash 177 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/autoclick/common/autoclick_ring_handler.cc » ('j') | ash/shell/lock_view.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698