OLD | NEW |
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/metrics/user_metrics_recorder.h" | 7 #include "ash/metrics/user_metrics_recorder.h" |
8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
9 #include "ash/shell_delegate.h" | 9 #include "ash/shell_delegate.h" |
10 #include "ash/shell_window_ids.h" | 10 #include "ash/shell_window_ids.h" |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 label->SetText(text_); | 75 label->SetText(text_); |
76 label->SetHorizontalAlignment(gfx::ALIGN_CENTER); | 76 label->SetHorizontalAlignment(gfx::ALIGN_CENTER); |
77 label->SetFontList(font_list); | 77 label->SetFontList(font_list); |
78 label->SetEnabledColor(kTextColor); | 78 label->SetEnabledColor(kTextColor); |
79 label->SetDisabledColor(kTextColor); | 79 label->SetDisabledColor(kTextColor); |
80 label->SetAutoColorReadabilityEnabled(false); | 80 label->SetAutoColorReadabilityEnabled(false); |
81 AddChildView(label); | 81 AddChildView(label); |
82 SetLayoutManager(new views::FillLayout); | 82 SetLayoutManager(new views::FillLayout); |
83 } | 83 } |
84 | 84 |
85 virtual gfx::Size GetPreferredSize() OVERRIDE { | 85 virtual gfx::Size GetPreferredSize() const OVERRIDE { |
86 return gfx::Size(width_, height_); | 86 return gfx::Size(width_, height_); |
87 } | 87 } |
88 | 88 |
89 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE { | 89 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE { |
90 SkPaint paint; | 90 SkPaint paint; |
91 paint.setStyle(SkPaint::kFill_Style); | 91 paint.setStyle(SkPaint::kFill_Style); |
92 paint.setColor(kWindowBackgroundColor); | 92 paint.setColor(kWindowBackgroundColor); |
93 canvas->DrawRoundRect(GetLocalBounds(), kWindowCornerRadius, paint); | 93 canvas->DrawRoundRect(GetLocalBounds(), kWindowCornerRadius, paint); |
94 views::WidgetDelegateView::OnPaint(canvas); | 94 views::WidgetDelegateView::OnPaint(canvas); |
95 } | 95 } |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 widget_->Show(); | 195 widget_->Show(); |
196 | 196 |
197 delegate->NotifyAccessibilityEvent(ui::AX_EVENT_ALERT, true); | 197 delegate->NotifyAccessibilityEvent(ui::AX_EVENT_ALERT, true); |
198 } | 198 } |
199 | 199 |
200 void ExitWarningHandler::Hide() { | 200 void ExitWarningHandler::Hide() { |
201 widget_.reset(); | 201 widget_.reset(); |
202 } | 202 } |
203 | 203 |
204 } // namespace ash | 204 } // namespace ash |
OLD | NEW |