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

Side by Side Diff: chrome/browser/chromeos/ui/idle_app_name_notification_view.cc

Issue 2717943002: Fix cc/paint skia type mismatches (Closed)
Patch Set: Rebase Created 3 years, 9 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "chrome/browser/chromeos/ui/idle_app_name_notification_view.h" 5 #include "chrome/browser/chromeos/ui/idle_app_name_notification_view.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "ash/public/cpp/shell_window_ids.h" 9 #include "ash/public/cpp/shell_window_ids.h"
10 #include "ash/shell.h" 10 #include "ash/shell.h"
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 aura::Window* widget_view = GetWidget()->GetNativeView(); 159 aura::Window* widget_view = GetWidget()->GetNativeView();
160 ui::Layer* layer = widget_view->layer(); 160 ui::Layer* layer = widget_view->layer();
161 ui::ScopedLayerAnimationSettings settings(layer->GetAnimator()); 161 ui::ScopedLayerAnimationSettings settings(layer->GetAnimator());
162 settings.AddObserver(this); 162 settings.AddObserver(this);
163 gfx::Rect rect = widget_view->bounds(); 163 gfx::Rect rect = widget_view->bounds();
164 rect.set_y(-GetPreferredSize().height()); 164 rect.set_y(-GetPreferredSize().height());
165 layer->SetBounds(rect); 165 layer->SetBounds(rect);
166 } 166 }
167 167
168 void OnPaint(gfx::Canvas* canvas) override { 168 void OnPaint(gfx::Canvas* canvas) override {
169 SkPaint paint; 169 cc::PaintFlags flags;
170 paint.setStyle(SkPaint::kFill_Style); 170 flags.setStyle(cc::PaintFlags::kFill_Style);
171 paint.setColor(kWindowBackgroundColor); 171 flags.setColor(kWindowBackgroundColor);
172 canvas->DrawRoundRect(GetLocalBounds(), kWindowCornerRadius, paint); 172 canvas->DrawRoundRect(GetLocalBounds(), kWindowCornerRadius, flags);
173 views::WidgetDelegateView::OnPaint(canvas); 173 views::WidgetDelegateView::OnPaint(canvas);
174 } 174 }
175 175
176 void GetAccessibleNodeData(ui::AXNodeData* node_data) override { 176 void GetAccessibleNodeData(ui::AXNodeData* node_data) override {
177 node_data->SetName(spoken_text_); 177 node_data->SetName(spoken_text_);
178 node_data->role = ui::AX_ROLE_ALERT; 178 node_data->role = ui::AX_ROLE_ALERT;
179 } 179 }
180 180
181 // ImplicitAnimationObserver overrides 181 // ImplicitAnimationObserver overrides
182 void OnImplicitAnimationsCompleted() override { Close(); } 182 void OnImplicitAnimationsCompleted() override { Close(); }
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 262
263 view_ = new IdleAppNameNotificationDelegateView( 263 view_ = new IdleAppNameNotificationDelegateView(
264 this, 264 this,
265 app_name, 265 app_name,
266 error, 266 error,
267 message_visibility_time_in_ms + animation_time_ms); 267 message_visibility_time_in_ms + animation_time_ms);
268 CreateAndShowWidget(view_, animation_time_ms); 268 CreateAndShowWidget(view_, animation_time_ms);
269 } 269 }
270 270
271 } // namespace chromeos 271 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/ui/focus_ring_layer.cc ('k') | chrome/browser/chromeos/ui/kiosk_external_update_notification.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698