OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/gtk/browser_titlebar.h" | 5 #include "chrome/browser/ui/gtk/browser_titlebar.h" |
6 | 6 |
7 #include <gdk/gdkkeysyms.h> | 7 #include <gdk/gdkkeysyms.h> |
8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 791 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
802 } | 802 } |
803 | 803 |
804 if (IsOffTheRecord()) | 804 if (IsOffTheRecord()) |
805 return; | 805 return; |
806 | 806 |
807 ProfileInfoCache& cache = | 807 ProfileInfoCache& cache = |
808 g_browser_process->profile_manager()->GetProfileInfoCache(); | 808 g_browser_process->profile_manager()->GetProfileInfoCache(); |
809 Profile* profile = browser_window_->browser()->profile(); | 809 Profile* profile = browser_window_->browser()->profile(); |
810 size_t index = cache.GetIndexOfProfileWithPath(profile->GetPath()); | 810 size_t index = cache.GetIndexOfProfileWithPath(profile->GetPath()); |
811 if (index != std::string::npos) { | 811 if (index != std::string::npos) { |
812 avatar_button_->SetIcon(cache.GetAvatarIconOfProfileAtIndex(index)); | 812 bool is_gaia_picture = |
| 813 cache.IsUsingGAIAPictureOfProfileAtIndex(index) && |
| 814 cache.GetGAIAPictureOfProfileAtIndex(index); |
| 815 avatar_button_->SetIcon( |
| 816 cache.GetAvatarIconOfProfileAtIndex(index), is_gaia_picture); |
813 | 817 |
814 BubbleGtk::ArrowLocationGtk arrow_location = | 818 BubbleGtk::ArrowLocationGtk arrow_location = |
815 display_avatar_on_left_ ^ base::i18n::IsRTL() ? | 819 display_avatar_on_left_ ^ base::i18n::IsRTL() ? |
816 BubbleGtk::ARROW_LOCATION_TOP_LEFT : | 820 BubbleGtk::ARROW_LOCATION_TOP_LEFT : |
817 BubbleGtk::ARROW_LOCATION_TOP_RIGHT; | 821 BubbleGtk::ARROW_LOCATION_TOP_RIGHT; |
818 avatar_button_->set_menu_arrow_location(arrow_location); | 822 avatar_button_->set_menu_arrow_location(arrow_location); |
819 } | 823 } |
820 } | 824 } |
821 | 825 |
822 void BrowserTitlebar::ShowFaviconMenu(GdkEventButton* event) { | 826 void BrowserTitlebar::ShowFaviconMenu(GdkEventButton* event) { |
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1129 ui::SimpleMenuModel::Delegate* delegate) | 1133 ui::SimpleMenuModel::Delegate* delegate) |
1130 : SimpleMenuModel(delegate) { | 1134 : SimpleMenuModel(delegate) { |
1131 AddItemWithStringId(IDC_NEW_TAB, IDS_TAB_CXMENU_NEWTAB); | 1135 AddItemWithStringId(IDC_NEW_TAB, IDS_TAB_CXMENU_NEWTAB); |
1132 AddItemWithStringId(IDC_RESTORE_TAB, IDS_RESTORE_TAB); | 1136 AddItemWithStringId(IDC_RESTORE_TAB, IDS_RESTORE_TAB); |
1133 AddSeparator(); | 1137 AddSeparator(); |
1134 AddItemWithStringId(IDC_TASK_MANAGER, IDS_TASK_MANAGER); | 1138 AddItemWithStringId(IDC_TASK_MANAGER, IDS_TASK_MANAGER); |
1135 AddSeparator(); | 1139 AddSeparator(); |
1136 AddCheckItemWithStringId(kShowWindowDecorationsCommand, | 1140 AddCheckItemWithStringId(kShowWindowDecorationsCommand, |
1137 IDS_SHOW_WINDOW_DECORATIONS_MENU); | 1141 IDS_SHOW_WINDOW_DECORATIONS_MENU); |
1138 } | 1142 } |
OLD | NEW |