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

Side by Side Diff: chrome/browser/ui/views/profiles/avatar_button.cc

Issue 2887363002: Always use the new style avatar button for the glass frame on Windows 10 (Closed)
Patch Set: Created 3 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 | « no previous file | 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/ui/views/profiles/avatar_button.h" 5 #include "chrome/browser/ui/views/profiles/avatar_button.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "chrome/app/vector_icons/vector_icons.h" 9 #include "chrome/app/vector_icons/vector_icons.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 361
362 void AvatarButton::SetButtonAvatar(int avatar_idr) { 362 void AvatarButton::SetButtonAvatar(int avatar_idr) {
363 ui::ResourceBundle* rb = &ui::ResourceBundle::GetSharedInstance(); 363 ui::ResourceBundle* rb = &ui::ResourceBundle::GetSharedInstance();
364 generic_avatar_ = *rb->GetImageNamed(avatar_idr).ToImageSkia(); 364 generic_avatar_ = *rb->GetImageNamed(avatar_idr).ToImageSkia();
365 } 365 }
366 366
367 // TODO(estade): all versions of this button should condense. 367 // TODO(estade): all versions of this button should condense.
368 bool AvatarButton::IsCondensible() const { 368 bool AvatarButton::IsCondensible() const {
369 #if defined(OS_WIN) 369 #if defined(OS_WIN)
370 return (base::win::GetVersion() >= base::win::VERSION_WIN10) && 370 return (base::win::GetVersion() >= base::win::VERSION_WIN10) &&
371 ThemeServiceFactory::GetForProfile(profile_)->UsingSystemTheme() &&
372 button_style_ == AvatarButtonStyle::NATIVE; 371 button_style_ == AvatarButtonStyle::NATIVE;
373 #else 372 #else
374 return false; 373 return false;
375 #endif 374 #endif
376 } 375 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698