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

Side by Side Diff: chrome/browser/ui/views/frame/browser_non_client_frame_view.cc

Issue 2832823002: Update avatar button to MD (Closed)
Patch Set: Rebased on CL 2833363002 Created 3 years, 8 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
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/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/app/vector_icons/vector_icons.h" 8 #include "chrome/app/vector_icons/vector_icons.h"
9 #include "chrome/browser/browser_process.h" 9 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/profiles/avatar_menu.h" 10 #include "chrome/browser/profiles/avatar_menu.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 SkColor BrowserNonClientFrameView::GetToolbarTopSeparatorColor() const { 58 SkColor BrowserNonClientFrameView::GetToolbarTopSeparatorColor() const {
59 const auto color_id = 59 const auto color_id =
60 ShouldPaintAsActive() 60 ShouldPaintAsActive()
61 ? ThemeProperties::COLOR_TOOLBAR_TOP_SEPARATOR 61 ? ThemeProperties::COLOR_TOOLBAR_TOP_SEPARATOR
62 : ThemeProperties::COLOR_TOOLBAR_TOP_SEPARATOR_INACTIVE; 62 : ThemeProperties::COLOR_TOOLBAR_TOP_SEPARATOR_INACTIVE;
63 return ShouldPaintAsThemed() ? GetThemeProvider()->GetColor(color_id) 63 return ShouldPaintAsThemed() ? GetThemeProvider()->GetColor(color_id)
64 : ThemeProperties::GetDefaultColor( 64 : ThemeProperties::GetDefaultColor(
65 color_id, browser_view_->IsIncognito()); 65 color_id, browser_view_->IsIncognito());
66 } 66 }
67 67
68 views::View* BrowserNonClientFrameView::GetProfileSwitcherView() const { 68 views::MenuButton* BrowserNonClientFrameView::GetProfileSwitcherButton() const {
69 return nullptr; 69 return nullptr;
70 } 70 }
71 71
72 void BrowserNonClientFrameView::UpdateClientArea() {} 72 void BrowserNonClientFrameView::UpdateClientArea() {}
73 73
74 void BrowserNonClientFrameView::VisibilityChanged(views::View* starting_from, 74 void BrowserNonClientFrameView::VisibilityChanged(views::View* starting_from,
75 bool is_visible) { 75 bool is_visible) {
76 // UpdateTaskbarDecoration() calls DrawTaskbarDecoration(), but that does 76 // UpdateTaskbarDecoration() calls DrawTaskbarDecoration(), but that does
77 // nothing if the window is not visible. So even if we've already gotten the 77 // nothing if the window is not visible. So even if we've already gotten the
78 // up-to-date decoration, we need to run the update procedure again here when 78 // up-to-date decoration, we need to run the update procedure again here when
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 // safety. See crbug.com/313800. 271 // safety. See crbug.com/313800.
272 gfx::Image decoration; 272 gfx::Image decoration;
273 AvatarMenu::GetImageForMenuButton( 273 AvatarMenu::GetImageForMenuButton(
274 browser_view()->browser()->profile()->GetPath(), &decoration); 274 browser_view()->browser()->profile()->GetPath(), &decoration);
275 // This can happen if the user deletes the current profile. 275 // This can happen if the user deletes the current profile.
276 if (decoration.IsEmpty()) 276 if (decoration.IsEmpty())
277 return; 277 return;
278 chrome::DrawTaskbarDecoration(frame_->GetNativeWindow(), &decoration); 278 chrome::DrawTaskbarDecoration(frame_->GetNativeWindow(), &decoration);
279 #endif 279 #endif
280 } 280 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698