| OLD | NEW |
| 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/frame/browser_non_client_frame_view.h" | 5 #include "chrome/browser/ui/views/frame/browser_non_client_frame_view.h" |
| 6 | 6 |
| 7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
| 8 #include "chrome/browser/browser_process.h" | 8 #include "chrome/browser/browser_process.h" |
| 9 #include "chrome/browser/profiles/avatar_menu.h" | 9 #include "chrome/browser/profiles/avatar_menu.h" |
| 10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 } | 50 } |
| 51 } | 51 } |
| 52 | 52 |
| 53 void BrowserNonClientFrameView::OnBrowserViewInitViewsComplete() {} | 53 void BrowserNonClientFrameView::OnBrowserViewInitViewsComplete() {} |
| 54 | 54 |
| 55 gfx::ImageSkia BrowserNonClientFrameView::GetOTRAvatarIcon() const { | 55 gfx::ImageSkia BrowserNonClientFrameView::GetOTRAvatarIcon() const { |
| 56 if (!ui::MaterialDesignController::IsModeMaterial()) | 56 if (!ui::MaterialDesignController::IsModeMaterial()) |
| 57 return *GetThemeProviderForProfile()->GetImageSkiaNamed(IDR_OTR_ICON); | 57 return *GetThemeProviderForProfile()->GetImageSkiaNamed(IDR_OTR_ICON); |
| 58 const SkColor icon_color = color_utils::PickContrastingColor( | 58 const SkColor icon_color = color_utils::PickContrastingColor( |
| 59 SK_ColorWHITE, gfx::kChromeIconGrey, GetFrameColor()); | 59 SK_ColorWHITE, gfx::kChromeIconGrey, GetFrameColor()); |
| 60 return gfx::CreateVectorIcon(gfx::VectorIconId::INCOGNITO, 24, icon_color); | 60 return gfx::CreateVectorIcon(gfx::VectorIconId::INCOGNITO, icon_color); |
| 61 } | 61 } |
| 62 | 62 |
| 63 SkColor BrowserNonClientFrameView::GetToolbarTopSeparatorColor() const { | 63 SkColor BrowserNonClientFrameView::GetToolbarTopSeparatorColor() const { |
| 64 const auto color_id = | 64 const auto color_id = |
| 65 ShouldPaintAsActive() | 65 ShouldPaintAsActive() |
| 66 ? ThemeProperties::COLOR_TOOLBAR_TOP_SEPARATOR | 66 ? ThemeProperties::COLOR_TOOLBAR_TOP_SEPARATOR |
| 67 : ThemeProperties::COLOR_TOOLBAR_TOP_SEPARATOR_INACTIVE; | 67 : ThemeProperties::COLOR_TOOLBAR_TOP_SEPARATOR_INACTIVE; |
| 68 return ShouldPaintAsThemed() ? GetThemeProvider()->GetColor(color_id) | 68 return ShouldPaintAsThemed() ? GetThemeProvider()->GetColor(color_id) |
| 69 : ThemeProperties::GetDefaultColor( | 69 : ThemeProperties::GetDefaultColor( |
| 70 color_id, browser_view_->IsOffTheRecord()); | 70 color_id, browser_view_->IsOffTheRecord()); |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 const ProfileAttributesStorage& storage = | 266 const ProfileAttributesStorage& storage = |
| 267 g_browser_process->profile_manager()->GetProfileAttributesStorage(); | 267 g_browser_process->profile_manager()->GetProfileAttributesStorage(); |
| 268 show_decoration = show_decoration && storage.GetNumberOfProfiles() > 1; | 268 show_decoration = show_decoration && storage.GetNumberOfProfiles() > 1; |
| 269 } | 269 } |
| 270 chrome::DrawTaskbarDecoration(frame_->GetNativeWindow(), | 270 chrome::DrawTaskbarDecoration(frame_->GetNativeWindow(), |
| 271 show_decoration | 271 show_decoration |
| 272 ? (taskbar_badge_avatar.IsEmpty() ? &avatar : &taskbar_badge_avatar) | 272 ? (taskbar_badge_avatar.IsEmpty() ? &avatar : &taskbar_badge_avatar) |
| 273 : nullptr); | 273 : nullptr); |
| 274 } | 274 } |
| 275 } | 275 } |
| OLD | NEW |