OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/views/frame/browser_view.h" | 5 #include "chrome/browser/views/frame/browser_view.h" |
6 | 6 |
7 #if defined(OS_LINUX) | 7 #if defined(OS_LINUX) |
8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
9 #endif | 9 #endif |
10 | 10 |
(...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
594 | 594 |
595 bool BrowserView::UseVerticalTabs() const { | 595 bool BrowserView::UseVerticalTabs() const { |
596 return browser_->tabstrip_model()->delegate()->UseVerticalTabs(); | 596 return browser_->tabstrip_model()->delegate()->UseVerticalTabs(); |
597 } | 597 } |
598 | 598 |
599 bool BrowserView::IsOffTheRecord() const { | 599 bool BrowserView::IsOffTheRecord() const { |
600 return browser_->profile()->IsOffTheRecord(); | 600 return browser_->profile()->IsOffTheRecord(); |
601 } | 601 } |
602 | 602 |
603 bool BrowserView::ShouldShowOffTheRecordAvatar() const { | 603 bool BrowserView::ShouldShowOffTheRecordAvatar() const { |
604 bool should_show_off_the_record_avatar = | 604 return IsOffTheRecord() && IsBrowserTypeNormal(); |
605 IsOffTheRecord() && IsBrowserTypeNormal(); | |
606 #if defined(OS_CHROMEOS) | |
607 should_show_off_the_record_avatar = should_show_off_the_record_avatar && | |
608 !CommandLine::ForCurrentProcess()->HasSwitch(switches::kGuestSession); | |
609 #endif | |
610 return should_show_off_the_record_avatar; | |
611 } | 605 } |
612 | 606 |
613 bool BrowserView::AcceleratorPressed(const views::Accelerator& accelerator) { | 607 bool BrowserView::AcceleratorPressed(const views::Accelerator& accelerator) { |
614 std::map<views::Accelerator, int>::const_iterator iter = | 608 std::map<views::Accelerator, int>::const_iterator iter = |
615 accelerator_table_.find(accelerator); | 609 accelerator_table_.find(accelerator); |
616 DCHECK(iter != accelerator_table_.end()); | 610 DCHECK(iter != accelerator_table_.end()); |
617 | 611 |
618 int command_id = iter->second; | 612 int command_id = iter->second; |
619 if (browser_->command_updater()->SupportsCommand(command_id) && | 613 if (browser_->command_updater()->SupportsCommand(command_id) && |
620 browser_->command_updater()->IsCommandEnabled(command_id)) { | 614 browser_->command_updater()->IsCommandEnabled(command_id)) { |
(...skipping 1853 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2474 SetAccessibleName(l10n_util::GetString(IDS_PRODUCT_NAME)); | 2468 SetAccessibleName(l10n_util::GetString(IDS_PRODUCT_NAME)); |
2475 | 2469 |
2476 return view; | 2470 return view; |
2477 } | 2471 } |
2478 #endif | 2472 #endif |
2479 | 2473 |
2480 // static | 2474 // static |
2481 FindBar* BrowserWindow::CreateFindBar(Browser* browser) { | 2475 FindBar* BrowserWindow::CreateFindBar(Browser* browser) { |
2482 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window())); | 2476 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window())); |
2483 } | 2477 } |
OLD | NEW |