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/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 Loading... |
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::ShouldShowAvatar() const { | 467 bool BrowserView::ShouldShowOffTheRecordAvatar() const { |
468 return IsBrowserTypeNormal() && | 468 return IsOffTheRecord() && IsBrowserTypeNormal(); |
469 (IsOffTheRecord() || | |
470 CommandLine::ForCurrentProcess()->HasSwitch(switches::kMultiProfiles)); | |
471 } | 469 } |
472 | 470 |
473 bool BrowserView::AcceleratorPressed(const views::Accelerator& accelerator) { | 471 bool BrowserView::AcceleratorPressed(const views::Accelerator& accelerator) { |
474 #if defined(OS_CHROMEOS) | 472 #if defined(OS_CHROMEOS) |
475 // If accessibility is enabled, stop speech and return false so that key | 473 // If accessibility is enabled, stop speech and return false so that key |
476 // combinations involving Search can be used for extra accessibility | 474 // combinations involving Search can be used for extra accessibility |
477 // functionality. | 475 // functionality. |
478 if (accelerator.key_code() == ui::VKEY_LWIN && | 476 if (accelerator.key_code() == ui::VKEY_LWIN && |
479 g_browser_process->local_state()->GetBoolean( | 477 g_browser_process->local_state()->GetBoolean( |
480 prefs::kAccessibilityEnabled)) { | 478 prefs::kAccessibilityEnabled)) { |
(...skipping 2126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2607 view->GetWidget()->non_client_view()->SetAccessibleName( | 2605 view->GetWidget()->non_client_view()->SetAccessibleName( |
2608 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)); | 2606 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)); |
2609 return view; | 2607 return view; |
2610 } | 2608 } |
2611 #endif | 2609 #endif |
2612 | 2610 |
2613 // static | 2611 // static |
2614 FindBar* BrowserWindow::CreateFindBar(Browser* browser) { | 2612 FindBar* BrowserWindow::CreateFindBar(Browser* browser) { |
2615 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window())); | 2613 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window())); |
2616 } | 2614 } |
OLD | NEW |