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

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

Issue 2851543002: Update avatar button to MD (part 1) (Closed)
Patch Set: Fixed TODO comments Created 3 years, 7 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/avatar_button_manager.cc
diff --git a/chrome/browser/ui/views/frame/avatar_button_manager.cc b/chrome/browser/ui/views/frame/avatar_button_manager.cc
index fa8b44816ca6663869e764b75a661805201154d2..442243c54e280da56678a7099ce8ec004ddd7ba6 100644
--- a/chrome/browser/ui/views/frame/avatar_button_manager.cc
+++ b/chrome/browser/ui/views/frame/avatar_button_manager.cc
@@ -31,7 +31,7 @@ void AvatarButtonManager::Update(AvatarButtonStyle style) {
// Desktop guest shows the avatar button.
browser_view->IsIncognito()) {
if (!view_) {
- view_ = new NewAvatarButton(this, style, profile);
+ view_ = new AvatarButton(this, style, profile);
view_->set_id(VIEW_ID_AVATAR_BUTTON);
frame_view_->AddChildView(view_);
frame->GetRootView()->Layout();
@@ -43,18 +43,8 @@ void AvatarButtonManager::Update(AvatarButtonStyle style) {
}
}
-void AvatarButtonManager::ButtonPreferredSizeChanged() {
- // Perform a re-layout if the avatar button has changed, since that can affect
- // the size of the tabs.
- if (!view_ || !frame_view_->browser_view()->initialized())
- return; // Ignore the update during view creation.
-
- frame_view_->InvalidateLayout();
- frame_view_->frame()->GetRootView()->Layout();
-}
-
void AvatarButtonManager::ButtonPressed(views::Button* sender,
- const ui::Event& event) {
+ const ui::Event& event) {
DCHECK_EQ(view_, sender);
BrowserWindow::AvatarBubbleMode mode =
BrowserWindow::AVATAR_BUBBLE_MODE_DEFAULT;
« no previous file with comments | « chrome/browser/ui/views/frame/avatar_button_manager.h ('k') | chrome/browser/ui/views/frame/glass_browser_frame_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698