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

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 if (!IsBrowserTypeNormal())
sky 2011/06/09 15:46:46 nit: use a single return, eg: return IsBrowserTyp
sail 2011/06/10 00:56:20 Done.
470 return false;
471 if (IsOffTheRecord())
472 return true;
473 return CommandLine::ForCurrentProcess()->HasSwitch(switches::kMultiProfiles);
470 } 474 }
471 475
472 bool BrowserView::AcceleratorPressed(const views::Accelerator& accelerator) { 476 bool BrowserView::AcceleratorPressed(const views::Accelerator& accelerator) {
473 #if defined(OS_CHROMEOS) 477 #if defined(OS_CHROMEOS)
474 // If accessibility is enabled, stop speech and return false so that key 478 // If accessibility is enabled, stop speech and return false so that key
475 // combinations involving Search can be used for extra accessibility 479 // combinations involving Search can be used for extra accessibility
476 // functionality. 480 // functionality.
477 if (accelerator.key_code() == ui::VKEY_LWIN && 481 if (accelerator.key_code() == ui::VKEY_LWIN &&
478 g_browser_process->local_state()->GetBoolean( 482 g_browser_process->local_state()->GetBoolean(
479 prefs::kAccessibilityEnabled)) { 483 prefs::kAccessibilityEnabled)) {
(...skipping 2124 matching lines...) Expand 10 before | Expand all | Expand 10 after
2604 view->GetWindow()->non_client_view()->SetAccessibleName( 2608 view->GetWindow()->non_client_view()->SetAccessibleName(
2605 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)); 2609 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME));
2606 return view; 2610 return view;
2607 } 2611 }
2608 #endif 2612 #endif
2609 2613
2610 // static 2614 // static
2611 FindBar* BrowserWindow::CreateFindBar(Browser* browser) { 2615 FindBar* BrowserWindow::CreateFindBar(Browser* browser) {
2612 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window())); 2616 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window()));
2613 } 2617 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698