| 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 10 matching lines...) Expand all Loading... |
| 21 #include "ui/gfx/text_utils.h" | 21 #include "ui/gfx/text_utils.h" |
| 22 #include "ui/views/controls/label.h" | 22 #include "ui/views/controls/label.h" |
| 23 #include "ui/views/layout/fill_layout.h" | 23 #include "ui/views/layout/fill_layout.h" |
| 24 #include "ui/views/view.h" | 24 #include "ui/views/view.h" |
| 25 #include "ui/views/widget/widget.h" | 25 #include "ui/views/widget/widget.h" |
| 26 #include "ui/views/widget/widget_delegate.h" | 26 #include "ui/views/widget/widget_delegate.h" |
| 27 | 27 |
| 28 namespace ash { | 28 namespace ash { |
| 29 namespace { | 29 namespace { |
| 30 | 30 |
| 31 const int64 kTimeOutMilliseconds = 2000; | 31 const int64_t kTimeOutMilliseconds = 2000; |
| 32 // Color of the text of the warning message. | 32 // Color of the text of the warning message. |
| 33 const SkColor kTextColor = SK_ColorWHITE; | 33 const SkColor kTextColor = SK_ColorWHITE; |
| 34 // Color of the window background. | 34 // Color of the window background. |
| 35 const SkColor kWindowBackgroundColor = SkColorSetARGB(0xC0, 0x0, 0x0, 0x0); | 35 const SkColor kWindowBackgroundColor = SkColorSetARGB(0xC0, 0x0, 0x0, 0x0); |
| 36 // Radius of the rounded corners of the window. | 36 // Radius of the rounded corners of the window. |
| 37 const int kWindowCornerRadius = 2; | 37 const int kWindowCornerRadius = 2; |
| 38 const int kHorizontalMarginAroundText = 100; | 38 const int kHorizontalMarginAroundText = 100; |
| 39 const int kVerticalMarginAroundText = 100; | 39 const int kVerticalMarginAroundText = 100; |
| 40 | 40 |
| 41 class ExitWarningWidgetDelegateView : public views::WidgetDelegateView { | 41 class ExitWarningWidgetDelegateView : public views::WidgetDelegateView { |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 widget_->Show(); | 180 widget_->Show(); |
| 181 | 181 |
| 182 delegate->NotifyAccessibilityEvent(ui::AX_EVENT_ALERT, true); | 182 delegate->NotifyAccessibilityEvent(ui::AX_EVENT_ALERT, true); |
| 183 } | 183 } |
| 184 | 184 |
| 185 void ExitWarningHandler::Hide() { | 185 void ExitWarningHandler::Hide() { |
| 186 widget_.reset(); | 186 widget_.reset(); |
| 187 } | 187 } |
| 188 | 188 |
| 189 } // namespace ash | 189 } // namespace ash |
| OLD | NEW |