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

Side by Side Diff: ash/common/system/toast/toast_overlay.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/system/toast/toast_overlay.h" 5 #include "ash/common/system/toast/toast_overlay.h"
6 6
7 #include "ash/common/shelf/wm_shelf.h" 7 #include "ash/common/shelf/wm_shelf.h"
8 #include "ash/common/wm_lookup.h" 8 #include "ash/common/wm_lookup.h"
9 #include "ash/common/wm_shell.h" 9 #include "ash/common/wm_shell.h"
10 #include "ash/common/wm_window.h" 10 #include "ash/common/wm_window.h"
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 label->SetMaximumWidth( 177 label->SetMaximumWidth(
178 GetMaximumSize().width() - button_->GetPreferredSize().width() - 178 GetMaximumSize().width() - button_->GetPreferredSize().width() -
179 kToastHorizontalSpacing * 2 - kToastHorizontalSpacing * 2); 179 kToastHorizontalSpacing * 2 - kToastHorizontalSpacing * 2);
180 AddChildView(button_); 180 AddChildView(button_);
181 } 181 }
182 } 182 }
183 183
184 ToastOverlayView::~ToastOverlayView() {} 184 ToastOverlayView::~ToastOverlayView() {}
185 185
186 void ToastOverlayView::OnPaint(gfx::Canvas* canvas) { 186 void ToastOverlayView::OnPaint(gfx::Canvas* canvas) {
187 SkPaint paint; 187 cc::PaintFlags paint;
188 paint.setStyle(SkPaint::kFill_Style); 188 paint.setStyle(cc::PaintFlags::kFill_Style);
189 paint.setColor(kButtonBackgroundColor); 189 paint.setColor(kButtonBackgroundColor);
190 canvas->DrawRoundRect(GetLocalBounds(), 2, paint); 190 canvas->DrawRoundRect(GetLocalBounds(), 2, paint);
191 views::View::OnPaint(canvas); 191 views::View::OnPaint(canvas);
192 } 192 }
193 193
194 gfx::Size ToastOverlayView::GetMinimumSize() const { 194 gfx::Size ToastOverlayView::GetMinimumSize() const {
195 return gfx::Size(kToastMinimumWidth, 0); 195 return gfx::Size(kToastMinimumWidth, 0);
196 } 196 }
197 197
198 gfx::Size ToastOverlayView::GetMaximumSize() const { 198 gfx::Size ToastOverlayView::GetMaximumSize() const {
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 ToastOverlayButton* ToastOverlay::dismiss_button_for_testing() { 303 ToastOverlayButton* ToastOverlay::dismiss_button_for_testing() {
304 return overlay_view_->button(); 304 return overlay_view_->button();
305 } 305 }
306 306
307 void ToastOverlay::ClickDismissButtonForTesting(const ui::Event& event) { 307 void ToastOverlay::ClickDismissButtonForTesting(const ui::Event& event) {
308 DCHECK(overlay_view_->button()); 308 DCHECK(overlay_view_->button());
309 overlay_view_->button()->NotifyClick(event); 309 overlay_view_->button()->NotifyClick(event);
310 } 310 }
311 311
312 } // namespace ash 312 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/system/chromeos/network/network_icon.cc ('k') | ash/common/system/tray/tray_background_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698