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

Side by Side Diff: chrome/browser/ui/views/aura/status_area_host_aura.cc

Issue 9307099: chromeos/aura: Make login screen status area font non-bold. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 8 years, 10 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/ui/views/aura/status_area_host_aura.h" 5 #include "chrome/browser/ui/views/aura/status_area_host_aura.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 "base/command_line.h" 9 #include "base/command_line.h"
10 #include "chrome/browser/chromeos/status/clock_menu_button.h" 10 #include "chrome/browser/chromeos/status/clock_menu_button.h"
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 NULL, 177 NULL,
178 native_window)); 178 native_window));
179 proxy_settings_dialog_->Show(); 179 proxy_settings_dialog_->Show();
180 } else { 180 } else {
181 NOTREACHED(); 181 NOTREACHED();
182 } 182 }
183 } 183 }
184 #endif 184 #endif
185 } 185 }
186 186
187 gfx::Font StatusAreaHostAura::GetStatusAreaFont(const gfx::Font& font) const {
188 return font.DeriveFont(0, gfx::Font::BOLD);
189 }
190
191 StatusAreaButton::TextStyle StatusAreaHostAura::GetStatusAreaTextStyle() const { 187 StatusAreaButton::TextStyle StatusAreaHostAura::GetStatusAreaTextStyle() const {
192 #if defined(OS_CHROMEOS) 188 #if defined(OS_CHROMEOS)
193 if (!chromeos::UserManager::Get()->user_is_logged_in()) 189 if (!chromeos::UserManager::Get()->user_is_logged_in())
194 return StatusAreaButton::GRAY_PLAIN; 190 return StatusAreaButton::GRAY_PLAIN_LIGHT;
195 191
196 const chromeos::ScreenLocker* locker = 192 const chromeos::ScreenLocker* locker =
197 chromeos::ScreenLocker::default_screen_locker(); 193 chromeos::ScreenLocker::default_screen_locker();
198 if (locker && locker->locked()) 194 if (locker && locker->locked())
199 return StatusAreaButton::GRAY_PLAIN; 195 return StatusAreaButton::GRAY_PLAIN_LIGHT;
200 #endif 196 #endif
201 197
202 if (ash::Shell::GetInstance()->IsWindowModeCompact()) { 198 if (ash::Shell::GetInstance()->IsWindowModeCompact()) {
203 Browser* browser = BrowserList::GetLastActive(); 199 Browser* browser = BrowserList::GetLastActive();
204 if (!browser) 200 if (!browser)
205 return StatusAreaButton::WHITE_HALOED; 201 return StatusAreaButton::WHITE_HALOED_BOLD;
206 202
207 ThemeService* theme_service = 203 ThemeService* theme_service =
208 ThemeServiceFactory::GetForProfile(browser->profile()); 204 ThemeServiceFactory::GetForProfile(browser->profile());
209 if (!theme_service->UsingDefaultTheme()) 205 if (!theme_service->UsingDefaultTheme())
210 return StatusAreaButton::WHITE_HALOED; 206 return StatusAreaButton::WHITE_HALOED_BOLD;
211 207
212 return browser->profile()->IsOffTheRecord() ? 208 return browser->profile()->IsOffTheRecord() ?
213 StatusAreaButton::WHITE_PLAIN : 209 StatusAreaButton::WHITE_PLAIN_BOLD :
214 StatusAreaButton::GRAY_EMBOSSED; 210 StatusAreaButton::GRAY_EMBOSSED_BOLD;
215 } else { 211 } else {
216 return StatusAreaButton::WHITE_HALOED; 212 return StatusAreaButton::WHITE_HALOED_BOLD;
217 } 213 }
218 } 214 }
219 215
220 void StatusAreaHostAura::ButtonVisibilityChanged(views::View* button_view) { 216 void StatusAreaHostAura::ButtonVisibilityChanged(views::View* button_view) {
221 if (status_area_view_) 217 if (status_area_view_)
222 status_area_view_->UpdateButtonVisibility(); 218 status_area_view_->UpdateButtonVisibility();
223 } 219 }
224 220
225 void StatusAreaHostAura::OnBrowserAdded(const Browser* browser) { 221 void StatusAreaHostAura::OnBrowserAdded(const Browser* browser) {
226 status_area_view_->UpdateButtonTextStyle(); 222 status_area_view_->UpdateButtonTextStyle();
(...skipping 16 matching lines...) Expand all
243 break; 239 break;
244 #if defined(OS_CHROMEOS) 240 #if defined(OS_CHROMEOS)
245 case chrome::NOTIFICATION_SCREEN_LOCK_STATE_CHANGED: 241 case chrome::NOTIFICATION_SCREEN_LOCK_STATE_CHANGED:
246 status_area_view_->UpdateButtonTextStyle(); 242 status_area_view_->UpdateButtonTextStyle();
247 break; 243 break;
248 #endif 244 #endif
249 default: 245 default:
250 NOTREACHED() << "Unexpected notification " << type; 246 NOTREACHED() << "Unexpected notification " << type;
251 } 247 }
252 } 248 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698