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