| 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/common/accelerators/exit_warning_handler.h" | 5 #include "ash/common/accelerators/exit_warning_handler.h" |
| 6 | 6 |
| 7 #include "ash/common/shell_delegate.h" | 7 #include "ash/common/shell_delegate.h" |
| 8 #include "ash/common/wm_shell.h" | 8 #include "ash/common/wm_shell.h" |
| 9 #include "ash/common/wm_window.h" | 9 #include "ash/common/wm_window.h" |
| 10 #include "ash/public/cpp/shell_window_ids.h" | 10 #include "ash/public/cpp/shell_window_ids.h" |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 label->SetSubpixelRenderingEnabled(false); | 66 label->SetSubpixelRenderingEnabled(false); |
| 67 AddChildView(label); | 67 AddChildView(label); |
| 68 SetLayoutManager(new views::FillLayout); | 68 SetLayoutManager(new views::FillLayout); |
| 69 } | 69 } |
| 70 | 70 |
| 71 gfx::Size GetPreferredSize() const override { | 71 gfx::Size GetPreferredSize() const override { |
| 72 return gfx::Size(width_, height_); | 72 return gfx::Size(width_, height_); |
| 73 } | 73 } |
| 74 | 74 |
| 75 void OnPaint(gfx::Canvas* canvas) override { | 75 void OnPaint(gfx::Canvas* canvas) override { |
| 76 cc::PaintFlags paint; | 76 cc::PaintFlags flags; |
| 77 paint.setStyle(cc::PaintFlags::kFill_Style); | 77 flags.setStyle(cc::PaintFlags::kFill_Style); |
| 78 paint.setColor(kWindowBackgroundColor); | 78 flags.setColor(kWindowBackgroundColor); |
| 79 canvas->DrawRoundRect(GetLocalBounds(), kWindowCornerRadius, paint); | 79 canvas->DrawRoundRect(GetLocalBounds(), kWindowCornerRadius, flags); |
| 80 views::WidgetDelegateView::OnPaint(canvas); | 80 views::WidgetDelegateView::OnPaint(canvas); |
| 81 } | 81 } |
| 82 | 82 |
| 83 void GetAccessibleNodeData(ui::AXNodeData* node_data) override { | 83 void GetAccessibleNodeData(ui::AXNodeData* node_data) override { |
| 84 node_data->SetName(accessible_name_); | 84 node_data->SetName(accessible_name_); |
| 85 node_data->role = ui::AX_ROLE_ALERT; | 85 node_data->role = ui::AX_ROLE_ALERT; |
| 86 } | 86 } |
| 87 | 87 |
| 88 private: | 88 private: |
| 89 base::string16 text_; | 89 base::string16 text_; |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 widget_->Show(); | 169 widget_->Show(); |
| 170 | 170 |
| 171 delegate->NotifyAccessibilityEvent(ui::AX_EVENT_ALERT, true); | 171 delegate->NotifyAccessibilityEvent(ui::AX_EVENT_ALERT, true); |
| 172 } | 172 } |
| 173 | 173 |
| 174 void ExitWarningHandler::Hide() { | 174 void ExitWarningHandler::Hide() { |
| 175 widget_.reset(); | 175 widget_.reset(); |
| 176 } | 176 } |
| 177 | 177 |
| 178 } // namespace ash | 178 } // namespace ash |
| OLD | NEW |