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

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

Issue 2832223003: Update profile switcher button on Linux. (Closed)
Patch Set: self review 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 unified diff | Download patch
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/profile_chooser_view.h" 5 #include "chrome/browser/ui/views/profiles/profile_chooser_view.h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/metrics/user_metrics.h" 8 #include "base/metrics/user_metrics.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "chrome/app/vector_icons/vector_icons.h" 10 #include "chrome/app/vector_icons/vector_icons.h"
(...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after
539 if (is_source_keyboard) 539 if (is_source_keyboard)
540 profile_bubble_->FocusFirstProfileButton(); 540 profile_bubble_->FocusFirstProfileButton();
541 } 541 }
542 542
543 // static 543 // static
544 bool ProfileChooserView::IsShowing() { 544 bool ProfileChooserView::IsShowing() {
545 return profile_bubble_ != NULL; 545 return profile_bubble_ != NULL;
546 } 546 }
547 547
548 // static 548 // static
549 views::Widget* ProfileChooserView::GetCurrentBubbleWidget() {
550 return profile_bubble_ ? profile_bubble_->GetWidget() : nullptr;
551 }
552
553 // static
549 void ProfileChooserView::Hide() { 554 void ProfileChooserView::Hide() {
550 if (IsShowing()) 555 if (IsShowing())
551 profile_bubble_->GetWidget()->Close(); 556 profile_bubble_->GetWidget()->Close();
552 } 557 }
553 558
554 ProfileChooserView::ProfileChooserView(views::View* anchor_view, 559 ProfileChooserView::ProfileChooserView(views::View* anchor_view,
555 Browser* browser, 560 Browser* browser,
556 profiles::BubbleViewMode view_mode, 561 profiles::BubbleViewMode view_mode,
557 profiles::TutorialMode tutorial_mode, 562 profiles::TutorialMode tutorial_mode,
558 signin::GAIAServiceType service_type, 563 signin::GAIAServiceType service_type,
(...skipping 1333 matching lines...) Expand 10 before | Expand all | Expand 10 after
1892 IncognitoModePrefs::GetAvailability(browser_->profile()->GetPrefs()) != 1897 IncognitoModePrefs::GetAvailability(browser_->profile()->GetPrefs()) !=
1893 IncognitoModePrefs::DISABLED; 1898 IncognitoModePrefs::DISABLED;
1894 return incognito_available && !browser_->profile()->IsGuestSession(); 1899 return incognito_available && !browser_->profile()->IsGuestSession();
1895 } 1900 }
1896 1901
1897 void ProfileChooserView::PostActionPerformed( 1902 void ProfileChooserView::PostActionPerformed(
1898 ProfileMetrics::ProfileDesktopMenu action_performed) { 1903 ProfileMetrics::ProfileDesktopMenu action_performed) {
1899 ProfileMetrics::LogProfileDesktopMenu(action_performed, gaia_service_type_); 1904 ProfileMetrics::LogProfileDesktopMenu(action_performed, gaia_service_type_);
1900 gaia_service_type_ = signin::GAIA_SERVICE_TYPE_NONE; 1905 gaia_service_type_ = signin::GAIA_SERVICE_TYPE_NONE;
1901 } 1906 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698