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

Side by Side Diff: chrome/browser/ui/views/profiles/avatar_label.cc

Issue 345533005: Parse extra parameters on x-chrome-manage-accounts header (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cleanup Created 6 years, 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/profiles/avatar_label.h" 5 #include "chrome/browser/ui/views/profiles/avatar_label.h"
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "chrome/browser/signin/signin_header_helper.h" 8 #include "chrome/browser/signin/signin_header_helper.h"
9 #include "chrome/browser/themes/theme_properties.h" 9 #include "chrome/browser/themes/theme_properties.h"
10 #include "chrome/browser/ui/views/frame/browser_view.h" 10 #include "chrome/browser/ui/views/frame/browser_view.h"
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 } 101 }
102 102
103 AvatarLabel::~AvatarLabel() {} 103 AvatarLabel::~AvatarLabel() {}
104 104
105 bool AvatarLabel::OnMousePressed(const ui::MouseEvent& event) { 105 bool AvatarLabel::OnMousePressed(const ui::MouseEvent& event) {
106 if (!LabelButton::OnMousePressed(event)) 106 if (!LabelButton::OnMousePressed(event))
107 return false; 107 return false;
108 108
109 browser_view_->ShowAvatarBubbleFromAvatarButton( 109 browser_view_->ShowAvatarBubbleFromAvatarButton(
110 BrowserWindow::AVATAR_BUBBLE_MODE_DEFAULT, 110 BrowserWindow::AVATAR_BUBBLE_MODE_DEFAULT,
111 signin::GAIA_SERVICE_TYPE_NONE); 111 signin::ManageAccountsParams());
112 return true; 112 return true;
113 } 113 }
114 114
115 void AvatarLabel::UpdateLabelStyle() { 115 void AvatarLabel::UpdateLabelStyle() {
116 // |browser_view_| can be NULL in unit tests. 116 // |browser_view_| can be NULL in unit tests.
117 if (!browser_view_) 117 if (!browser_view_)
118 return; 118 return;
119 119
120 SkColor color_label = browser_view_->frame()->GetThemeProvider()->GetColor( 120 SkColor color_label = browser_view_->frame()->GetThemeProvider()->GetColor(
121 ThemeProperties::COLOR_SUPERVISED_USER_LABEL); 121 ThemeProperties::COLOR_SUPERVISED_USER_LABEL);
122 for (size_t state = 0; state < STATE_COUNT; ++state) 122 for (size_t state = 0; state < STATE_COUNT; ++state)
123 SetTextColor(static_cast<ButtonState>(state), color_label); 123 SetTextColor(static_cast<ButtonState>(state), color_label);
124 SchedulePaint(); 124 SchedulePaint();
125 } 125 }
126 126
127 void AvatarLabel::SetLabelOnRight(bool label_on_right) { 127 void AvatarLabel::SetLabelOnRight(bool label_on_right) {
128 SetBorder(scoped_ptr<views::Border>(new AvatarLabelBorder(label_on_right))); 128 SetBorder(scoped_ptr<views::Border>(new AvatarLabelBorder(label_on_right)));
129 } 129 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/opaque_browser_frame_view.cc ('k') | chrome/browser/ui/views/profiles/profile_chooser_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698