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 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
470 return browser_->profile()->IsOffTheRecord(); | 470 return browser_->profile()->IsOffTheRecord(); |
471 } | 471 } |
472 | 472 |
473 bool BrowserView::ShouldShowAvatar() const { | 473 bool BrowserView::ShouldShowAvatar() const { |
474 if (!IsBrowserTypeNormal()) | 474 if (!IsBrowserTypeNormal()) |
475 return false; | 475 return false; |
476 if (IsOffTheRecord()) | 476 if (IsOffTheRecord()) |
477 return true; | 477 return true; |
478 | 478 |
479 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kMultiProfiles)) { | 479 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kMultiProfiles)) { |
480 ProfileInfoCache& cache = | 480 // TODO(sail): Once the multi-profile options UI is done we only want to |
481 g_browser_process->profile_manager()->GetProfileInfoCache(); | 481 // show the avatar if the user has more than one profile. |
482 if (cache.GetNumberOfProfiles() > 1) | 482 return true; |
483 return true; | |
484 } | 483 } |
485 | 484 |
486 return false; | 485 return false; |
487 } | 486 } |
488 | 487 |
489 bool BrowserView::AcceleratorPressed(const views::Accelerator& accelerator) { | 488 bool BrowserView::AcceleratorPressed(const views::Accelerator& accelerator) { |
490 #if defined(OS_CHROMEOS) | 489 #if defined(OS_CHROMEOS) |
491 // If accessibility is enabled, stop speech and return false so that key | 490 // If accessibility is enabled, stop speech and return false so that key |
492 // combinations involving Search can be used for extra accessibility | 491 // combinations involving Search can be used for extra accessibility |
493 // functionality. | 492 // functionality. |
(...skipping 2143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2637 view->GetWidget()->non_client_view()->SetAccessibleName( | 2636 view->GetWidget()->non_client_view()->SetAccessibleName( |
2638 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)); | 2637 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)); |
2639 return view; | 2638 return view; |
2640 } | 2639 } |
2641 #endif | 2640 #endif |
2642 | 2641 |
2643 // static | 2642 // static |
2644 FindBar* BrowserWindow::CreateFindBar(Browser* browser) { | 2643 FindBar* BrowserWindow::CreateFindBar(Browser* browser) { |
2645 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window())); | 2644 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window())); |
2646 } | 2645 } |
OLD | NEW |