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

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

Issue 2640983002: Rename paint data structures (Closed)
Patch Set: DrawingDisplayItem Created 3 years, 10 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
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/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
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 SkPaint paint; 76 cc::PaintFlags paint;
77 paint.setStyle(SkPaint::kFill_Style); 77 paint.setStyle(cc::PaintFlags::kFill_Style);
78 paint.setColor(kWindowBackgroundColor); 78 paint.setColor(kWindowBackgroundColor);
79 canvas->DrawRoundRect(GetLocalBounds(), kWindowCornerRadius, paint); 79 canvas->DrawRoundRect(GetLocalBounds(), kWindowCornerRadius, paint);
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
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « ash/common/accelerators/debug_commands.cc ('k') | ash/common/frame/caption_buttons/frame_caption_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698