| OLD | NEW | 
|    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  Loading... | 
|   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  Loading... | 
|  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 | 
| OLD | NEW |