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

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: Change profile menu button to avatar button 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 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 } 457 }
458 458
459 bool BrowserView::UseCompactNavigationBar() const { 459 bool BrowserView::UseCompactNavigationBar() const {
460 return browser_->tabstrip_model()->delegate()->UseCompactNavigationBar(); 460 return browser_->tabstrip_model()->delegate()->UseCompactNavigationBar();
461 } 461 }
462 462
463 bool BrowserView::IsOffTheRecord() const { 463 bool BrowserView::IsOffTheRecord() const {
464 return browser_->profile()->IsOffTheRecord(); 464 return browser_->profile()->IsOffTheRecord();
465 } 465 }
466 466
467 bool BrowserView::ShouldShowOffTheRecordAvatar() const { 467 bool BrowserView::ShouldShowAvatar() const {
468 return IsOffTheRecord() && IsBrowserTypeNormal(); 468 return IsBrowserTypeNormal() &&
469 (IsOffTheRecord() ||
470 CommandLine::ForCurrentProcess()->HasSwitch(switches::kMultiProfiles));
469 } 471 }
470 472
471 bool BrowserView::AcceleratorPressed(const views::Accelerator& accelerator) { 473 bool BrowserView::AcceleratorPressed(const views::Accelerator& accelerator) {
472 #if defined(OS_CHROMEOS) 474 #if defined(OS_CHROMEOS)
473 // If accessibility is enabled, stop speech and return false so that key 475 // If accessibility is enabled, stop speech and return false so that key
474 // combinations involving Search can be used for extra accessibility 476 // combinations involving Search can be used for extra accessibility
475 // functionality. 477 // functionality.
476 if (accelerator.key_code() == ui::VKEY_LWIN && 478 if (accelerator.key_code() == ui::VKEY_LWIN &&
477 g_browser_process->local_state()->GetBoolean( 479 g_browser_process->local_state()->GetBoolean(
478 prefs::kAccessibilityEnabled)) { 480 prefs::kAccessibilityEnabled)) {
(...skipping 2126 matching lines...) Expand 10 before | Expand all | Expand 10 after
2605 view->GetWidget()->non_client_view()->SetAccessibleName( 2607 view->GetWidget()->non_client_view()->SetAccessibleName(
2606 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)); 2608 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME));
2607 return view; 2609 return view;
2608 } 2610 }
2609 #endif 2611 #endif
2610 2612
2611 // static 2613 // static
2612 FindBar* BrowserWindow::CreateFindBar(Browser* browser) { 2614 FindBar* BrowserWindow::CreateFindBar(Browser* browser) {
2613 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window())); 2615 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window()));
2614 } 2616 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.h ('k') | chrome/browser/ui/views/frame/glass_browser_frame_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698