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

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

Issue 1785643002: Update avatar icon when nonclient frame view is added to view hierarchy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More consistent calling of GetNativeWindow() Created 4 years, 9 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_mus.h" 5 #include "chrome/browser/ui/views/frame/browser_non_client_frame_view_mus.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/profiler/scoped_tracker.h" 9 #include "base/profiler/scoped_tracker.h"
10 #include "chrome/app/chrome_command_ids.h" 10 #include "chrome/app/chrome_command_ids.h"
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 } 119 }
120 120
121 void BrowserNonClientFrameViewMus::Init() { 121 void BrowserNonClientFrameViewMus::Init() {
122 // Initializing the TabIconView is expensive, so only do it if we need to. 122 // Initializing the TabIconView is expensive, so only do it if we need to.
123 if (browser_view()->ShouldShowWindowIcon()) { 123 if (browser_view()->ShouldShowWindowIcon()) {
124 window_icon_ = new TabIconView(this, nullptr); 124 window_icon_ = new TabIconView(this, nullptr);
125 window_icon_->set_is_light(true); 125 window_icon_->set_is_light(true);
126 AddChildView(window_icon_); 126 AddChildView(window_icon_);
127 window_icon_->Update(); 127 window_icon_->Update();
128 } 128 }
129
130 UpdateAvatar();
131 } 129 }
132 130
133 /////////////////////////////////////////////////////////////////////////////// 131 ///////////////////////////////////////////////////////////////////////////////
134 // BrowserNonClientFrameView: 132 // BrowserNonClientFrameView:
135 133
136 void BrowserNonClientFrameViewMus::OnBrowserViewInitViewsComplete() { 134 void BrowserNonClientFrameViewMus::OnBrowserViewInitViewsComplete() {
137 DCHECK(browser_view()->tabstrip()); 135 DCHECK(browser_view()->tabstrip());
138 DCHECK(!tab_strip_); 136 DCHECK(!tab_strip_);
139 tab_strip_ = browser_view()->tabstrip(); 137 tab_strip_ = browser_view()->tabstrip();
140 tab_strip_->AddObserver(this); 138 tab_strip_->AddObserver(this);
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after
620 } 618 }
621 619
622 void BrowserNonClientFrameViewMus::PaintContentEdge(gfx::Canvas* canvas) { 620 void BrowserNonClientFrameViewMus::PaintContentEdge(gfx::Canvas* canvas) {
623 DCHECK(!UsePackagedAppHeaderStyle() && !UseWebAppHeaderStyle()); 621 DCHECK(!UsePackagedAppHeaderStyle() && !UseWebAppHeaderStyle());
624 const int bottom = frame_values().normal_insets.bottom(); 622 const int bottom = frame_values().normal_insets.bottom();
625 canvas->FillRect( 623 canvas->FillRect(
626 gfx::Rect(0, bottom, width(), kClientEdgeThickness), 624 gfx::Rect(0, bottom, width(), kClientEdgeThickness),
627 GetThemeProvider()->GetColor( 625 GetThemeProvider()->GetColor(
628 ThemeProperties::COLOR_TOOLBAR_BOTTOM_SEPARATOR)); 626 ThemeProperties::COLOR_TOOLBAR_BOTTOM_SEPARATOR));
629 } 627 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.cc ('k') | chrome/browser/ui/views/frame/browser_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698