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

Side by Side Diff: chrome/browser/ui/views/frame/browser_view.cc

Issue 7484040: Multi-Profiles: Only show the avatar icon if user has multiple profiles (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: mac Created 9 years, 4 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
« no previous file with comments | « chrome/browser/ui/gtk/browser_titlebar.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/views/frame/browser_view.h" 5 #include "chrome/browser/ui/views/frame/browser_view.h"
6 6
7 #if defined(TOOLKIT_USES_GTK) 7 #if defined(TOOLKIT_USES_GTK)
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 #endif 9 #endif
10 10
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after
471 return browser_->profile()->IsOffTheRecord(); 471 return browser_->profile()->IsOffTheRecord();
472 } 472 }
473 473
474 bool BrowserView::ShouldShowAvatar() const { 474 bool BrowserView::ShouldShowAvatar() const {
475 if (!IsBrowserTypeNormal()) 475 if (!IsBrowserTypeNormal())
476 return false; 476 return false;
477 if (IsOffTheRecord()) 477 if (IsOffTheRecord())
478 return true; 478 return true;
479 479
480 if (ProfileManager::IsMultipleProfilesEnabled()) { 480 if (ProfileManager::IsMultipleProfilesEnabled()) {
481 // TODO(sail): Once the multi-profile options UI is done we only want to 481 // Show the profile avatar after the user has created more than one profile.
482 // show the avatar if the user has more than one profile. 482 ProfileInfoCache& cache =
483 return true; 483 g_browser_process->profile_manager()->GetProfileInfoCache();
484 return cache.GetNumberOfProfiles() > 1;
484 } 485 }
485 486
486 return false; 487 return false;
487 } 488 }
488 489
489 bool BrowserView::AcceleratorPressed(const views::Accelerator& accelerator) { 490 bool BrowserView::AcceleratorPressed(const views::Accelerator& accelerator) {
490 #if defined(OS_CHROMEOS) 491 #if defined(OS_CHROMEOS)
491 // If accessibility is enabled, stop speech and return false so that key 492 // If accessibility is enabled, stop speech and return false so that key
492 // combinations involving Search can be used for extra accessibility 493 // combinations involving Search can be used for extra accessibility
493 // functionality. 494 // functionality.
(...skipping 2163 matching lines...) Expand 10 before | Expand all | Expand 10 after
2657 view->GetWidget()->non_client_view()->SetAccessibleName( 2658 view->GetWidget()->non_client_view()->SetAccessibleName(
2658 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)); 2659 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME));
2659 return view; 2660 return view;
2660 } 2661 }
2661 #endif 2662 #endif
2662 2663
2663 // static 2664 // static
2664 FindBar* BrowserWindow::CreateFindBar(Browser* browser) { 2665 FindBar* BrowserWindow::CreateFindBar(Browser* browser) {
2665 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window())); 2666 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window()));
2666 } 2667 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/browser_titlebar.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698