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

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

Issue 7003080: Change profile menu button to avatar button (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 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 (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 447 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 } 458 }
459 459
460 bool BrowserView::UseCompactNavigationBar() const { 460 bool BrowserView::UseCompactNavigationBar() const {
461 return browser_->tabstrip_model()->delegate()->UseCompactNavigationBar(); 461 return browser_->tabstrip_model()->delegate()->UseCompactNavigationBar();
462 } 462 }
463 463
464 bool BrowserView::IsOffTheRecord() const { 464 bool BrowserView::IsOffTheRecord() const {
465 return browser_->profile()->IsOffTheRecord(); 465 return browser_->profile()->IsOffTheRecord();
466 } 466 }
467 467
468 bool BrowserView::ShouldShowOffTheRecordAvatar() const { 468 bool BrowserView::ShouldShowAvatar() const {
469 return IsOffTheRecord() && IsBrowserTypeNormal(); 469 return IsBrowserTypeNormal() &&
470 (IsOffTheRecord() ||
471 CommandLine::ForCurrentProcess()->HasSwitch(switches::kMultiProfiles));
470 } 472 }
471 473
472 bool BrowserView::AcceleratorPressed(const views::Accelerator& accelerator) { 474 bool BrowserView::AcceleratorPressed(const views::Accelerator& accelerator) {
473 #if defined(OS_CHROMEOS) 475 #if defined(OS_CHROMEOS)
474 // If accessibility is enabled, stop speech and return false so that key 476 // If accessibility is enabled, stop speech and return false so that key
475 // combinations involving Search can be used for extra accessibility 477 // combinations involving Search can be used for extra accessibility
476 // functionality. 478 // functionality.
477 if (accelerator.key_code() == ui::VKEY_LWIN && 479 if (accelerator.key_code() == ui::VKEY_LWIN &&
478 g_browser_process->local_state()->GetBoolean( 480 g_browser_process->local_state()->GetBoolean(
479 prefs::kAccessibilityEnabled)) { 481 prefs::kAccessibilityEnabled)) {
(...skipping 2124 matching lines...) Expand 10 before | Expand all | Expand 10 after
2604 view->GetWindow()->non_client_view()->SetAccessibleName( 2606 view->GetWindow()->non_client_view()->SetAccessibleName(
2605 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)); 2607 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME));
2606 return view; 2608 return view;
2607 } 2609 }
2608 #endif 2610 #endif
2609 2611
2610 // static 2612 // static
2611 FindBar* BrowserWindow::CreateFindBar(Browser* browser) { 2613 FindBar* BrowserWindow::CreateFindBar(Browser* browser) {
2612 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window())); 2614 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window()));
2613 } 2615 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698