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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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; |
74 label_->SetHorizontalAlignment(gfx::ALIGN_LEFT); | 74 label_->SetHorizontalAlignment(gfx::ALIGN_LEFT); |
75 ui::ResourceBundle* rb = &ui::ResourceBundle::GetSharedInstance(); | 75 ui::ResourceBundle* rb = &ui::ResourceBundle::GetSharedInstance(); |
76 label_->SetFontList(rb->GetFontList(ui::ResourceBundle::BoldFont)); | 76 label_->SetFontList(rb->GetFontList(ui::ResourceBundle::BoldFont)); |
77 label_->SetEnabledColor(kTextColor); | 77 label_->SetEnabledColor(kTextColor); |
78 label_->SetDisabledColor(kTextColor); | |
79 label_->SetAutoColorReadabilityEnabled(false); | 78 label_->SetAutoColorReadabilityEnabled(false); |
80 label_->SetMultiLine(true); | 79 label_->SetMultiLine(true); |
81 AddChildView(label_); | 80 AddChildView(label_); |
82 } | 81 } |
83 | 82 |
84 void InformOwnerForDismiss() { | 83 void InformOwnerForDismiss() { |
85 // Inform the |owner_| that we are going away. | 84 // Inform the |owner_| that we are going away. |
86 if (owner_) { | 85 if (owner_) { |
87 KioskExternalUpdateNotification* owner = owner_; | 86 KioskExternalUpdateNotification* owner = owner_; |
88 owner_ = NULL; | 87 owner_ = NULL; |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 | 147 |
149 void KioskExternalUpdateNotification::Dismiss() { | 148 void KioskExternalUpdateNotification::Dismiss() { |
150 if (view_) { | 149 if (view_) { |
151 KioskExternalUpdateNotificationView* view = view_; | 150 KioskExternalUpdateNotificationView* view = view_; |
152 view_ = NULL; | 151 view_ = NULL; |
153 view->CloseByOwner(); | 152 view->CloseByOwner(); |
154 } | 153 } |
155 } | 154 } |
156 | 155 |
157 } // namespace chromeos | 156 } // namespace chromeos |
OLD | NEW |