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

Unified Diff: chrome/browser/ui/views/frame/browser_non_client_frame_view.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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/frame/browser_non_client_frame_view.cc
diff --git a/chrome/browser/ui/views/frame/browser_non_client_frame_view.cc b/chrome/browser/ui/views/frame/browser_non_client_frame_view.cc
index af22884aaddf9bf7d2466797792ae164b9c37e4f..b2a6caa11f4a1a742423856ffd7672b9b0d93168 100644
--- a/chrome/browser/ui/views/frame/browser_non_client_frame_view.cc
+++ b/chrome/browser/ui/views/frame/browser_non_client_frame_view.cc
@@ -189,6 +189,12 @@ void BrowserNonClientFrameView::UpdateOldAvatarButton() {
avatar_button_->SetAvatarIcon(avatar, is_rectangle);
}
+void BrowserNonClientFrameView::ViewHierarchyChanged(
+ const ViewHierarchyChangedDetails& details) {
+ if (details.is_add && details.child == this)
+ UpdateAvatar();
+}
+
void BrowserNonClientFrameView::OnProfileAdded(
const base::FilePath& profile_path) {
OnProfileAvatarChanged(profile_path);

Powered by Google App Engine
This is Rietveld 408576698