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

Side by Side Diff: chrome/browser/chromeos/ui/kiosk_external_update_notification.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/kiosk_external_update_notification.h" 5 #include "chrome/browser/chromeos/ui/kiosk_external_update_notification.h"
6 6
7 #include "ash/public/cpp/shell_window_ids.h" 7 #include "ash/public/cpp/shell_window_ids.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "ui/aura/window.h" 10 #include "ui/aura/window.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 if (!widget_closed_) { 50 if (!widget_closed_) {
51 widget_closed_ = true; 51 widget_closed_ = true;
52 GetWidget()->Close(); 52 GetWidget()->Close();
53 } 53 }
54 } 54 }
55 55
56 void SetMessage(const base::string16& message) { label_->SetText(message); } 56 void SetMessage(const base::string16& message) { label_->SetText(message); }
57 57
58 // views::WidgetDelegateView overrides: 58 // views::WidgetDelegateView overrides:
59 void OnPaint(gfx::Canvas* canvas) override { 59 void OnPaint(gfx::Canvas* canvas) override {
60 SkPaint paint; 60 cc::PaintFlags flags;
61 paint.setStyle(SkPaint::kFill_Style); 61 flags.setStyle(cc::PaintFlags::kFill_Style);
62 paint.setColor(kWindowBackgroundColor); 62 flags.setColor(kWindowBackgroundColor);
63 canvas->DrawRoundRect(GetLocalBounds(), kWindowCornerRadius, paint); 63 canvas->DrawRoundRect(GetLocalBounds(), kWindowCornerRadius, flags);
64 views::WidgetDelegateView::OnPaint(canvas); 64 views::WidgetDelegateView::OnPaint(canvas);
65 } 65 }
66 66
67 gfx::Size GetPreferredSize() const override { 67 gfx::Size GetPreferredSize() const override {
68 return gfx::Size(kPreferredWidth, kPreferredHeight); 68 return gfx::Size(kPreferredWidth, kPreferredHeight);
69 } 69 }
70 70
71 private: 71 private:
72 void AddLabel() { 72 void AddLabel() {
73 label_ = new views::Label; 73 label_ = new views::Label;
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 148
149 void KioskExternalUpdateNotification::Dismiss() { 149 void KioskExternalUpdateNotification::Dismiss() {
150 if (view_) { 150 if (view_) {
151 KioskExternalUpdateNotificationView* view = view_; 151 KioskExternalUpdateNotificationView* view = view_;
152 view_ = NULL; 152 view_ = NULL;
153 view->CloseByOwner(); 153 view->CloseByOwner();
154 } 154 }
155 } 155 }
156 156
157 } // namespace chromeos 157 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/ui/idle_app_name_notification_view.cc ('k') | chrome/browser/ui/app_list/extension_app_item.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698