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

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

Issue 1123723002: [chrome/browser/chromeos] ui::ResourceBundle::GetSharedInstance should return a pointer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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
« no previous file with comments | « chrome/browser/chromeos/ui/idle_app_name_notification_view.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/shell.h" 7 #include "ash/shell.h"
8 #include "ash/shell_window_ids.h" 8 #include "ash/shell_window_ids.h"
9 #include "ui/aura/window.h" 9 #include "ui/aura/window.h"
10 #include "ui/base/resource/resource_bundle.h" 10 #include "ui/base/resource/resource_bundle.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 } 64 }
65 65
66 gfx::Size GetPreferredSize() const override { 66 gfx::Size GetPreferredSize() const override {
67 return gfx::Size(kPreferredWidth, kPreferredHeight); 67 return gfx::Size(kPreferredWidth, kPreferredHeight);
68 } 68 }
69 69
70 private: 70 private:
71 void AddLabel() { 71 void AddLabel() {
72 label_ = new views::Label; 72 label_ = new views::Label;
73 label_->SetHorizontalAlignment(gfx::ALIGN_LEFT); 73 label_->SetHorizontalAlignment(gfx::ALIGN_LEFT);
74 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); 74 ui::ResourceBundle* rb = &ui::ResourceBundle::GetSharedInstance();
75 label_->SetFontList(rb.GetFontList(ui::ResourceBundle::BoldFont)); 75 label_->SetFontList(rb->GetFontList(ui::ResourceBundle::BoldFont));
76 label_->SetEnabledColor(kTextColor); 76 label_->SetEnabledColor(kTextColor);
77 label_->SetDisabledColor(kTextColor); 77 label_->SetDisabledColor(kTextColor);
78 label_->SetAutoColorReadabilityEnabled(false); 78 label_->SetAutoColorReadabilityEnabled(false);
79 label_->SetMultiLine(true); 79 label_->SetMultiLine(true);
80 AddChildView(label_); 80 AddChildView(label_);
81 } 81 }
82 82
83 void InformOwnerForDismiss() { 83 void InformOwnerForDismiss() {
84 // Inform the |owner_| that we are going away. 84 // Inform the |owner_| that we are going away.
85 if (owner_) { 85 if (owner_) {
(...skipping 62 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') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698