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

Unified Diff: chrome/browser/ui/views/frame/browser_non_client_frame_view_mus.cc

Issue 2851543002: Update avatar button to MD (part 1) (Closed)
Patch Set: Renamed NewAvatarButton->ThemedAvatarButton and MaterialDesignAvatarButton->Win10NativeAvatarButton… 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/frame/browser_non_client_frame_view_mus.cc
diff --git a/chrome/browser/ui/views/frame/browser_non_client_frame_view_mus.cc b/chrome/browser/ui/views/frame/browser_non_client_frame_view_mus.cc
index 273910bdf986cd5b93d0027232bcf135fd099324..30bb22f04db37c683351ebd7a38001c49ec49530 100644
--- a/chrome/browser/ui/views/frame/browser_non_client_frame_view_mus.cc
+++ b/chrome/browser/ui/views/frame/browser_non_client_frame_view_mus.cc
@@ -172,7 +172,7 @@ void BrowserNonClientFrameViewMus::UpdateThrobber(bool running) {
views::View* BrowserNonClientFrameViewMus::GetProfileSwitcherView() const {
#if defined(FRAME_AVATAR_BUTTON)
- return profile_switcher_.view();
+ return profile_switcher_.button();
#else
return nullptr;
#endif
@@ -250,8 +250,8 @@ int BrowserNonClientFrameViewMus::NonClientHitTest(const gfx::Point& point) {
int hit_test = HTCLIENT;
#if defined(FRAME_AVATAR_BUTTON)
- if (hit_test == HTCAPTION && profile_switcher_.view() &&
- ConvertedHitTest(this, profile_switcher_.view(), point)) {
+ if (hit_test == HTCAPTION && profile_switcher_.button() &&
+ ConvertedHitTest(this, profile_switcher_.button(), point)) {
return HTCLIENT;
}
#endif
@@ -305,7 +305,7 @@ void BrowserNonClientFrameViewMus::Layout() {
LayoutIncognitoButton();
#if defined(FRAME_AVATAR_BUTTON)
- if (profile_switcher_.view())
+ if (profile_switcher_.button())
LayoutProfileSwitcher();
#endif
@@ -408,9 +408,9 @@ int BrowserNonClientFrameViewMus::GetTabStripRightInset() const {
int right_inset = kTabstripRightSpacing + frame_right_insets;
#if defined(FRAME_AVATAR_BUTTON)
- if (profile_switcher_.view()) {
+ if (profile_switcher_.button()) {
right_inset += kAvatarButtonOffset +
- profile_switcher_.view()->GetPreferredSize().width();
+ profile_switcher_.button()->GetPreferredSize().width();
}
#endif
@@ -444,10 +444,10 @@ void BrowserNonClientFrameViewMus::LayoutIncognitoButton() {
void BrowserNonClientFrameViewMus::LayoutProfileSwitcher() {
#if defined(FRAME_AVATAR_BUTTON)
- gfx::Size button_size = profile_switcher_.view()->GetPreferredSize();
+ gfx::Size button_size = profile_switcher_.button()->GetPreferredSize();
int button_x = width() - GetTabStripRightInset() + kAvatarButtonOffset;
- profile_switcher_.view()->SetBounds(button_x, 0, button_size.width(),
- button_size.height());
+ profile_switcher_.button()->SetBounds(button_x, 0, button_size.width(),
+ button_size.height());
#endif
}

Powered by Google App Engine
This is Rietveld 408576698