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(OS_LINUX) | 7 #if defined(OS_LINUX) |
8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
9 #endif | 9 #endif |
10 | 10 |
(...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 return IsOffTheRecord() && IsBrowserTypeNormal(); | 604 return IsOffTheRecord() && IsBrowserTypeNormal(); |
605 } | 605 } |
606 | 606 |
607 bool BrowserView::AcceleratorPressed(const views::Accelerator& accelerator) { | 607 bool BrowserView::AcceleratorPressed(const views::Accelerator& accelerator) { |
| 608 #if defined(OS_CHROMEOS) |
| 609 // If accessibility is enabled, ignore accelerators involving the Search |
| 610 // key so that key combinations involving Search can be used for extra |
| 611 // accessibility functionality. |
| 612 if (accelerator.GetKeyCode() == ui::VKEY_LWIN && |
| 613 browser_->profile()->GetPrefs()->GetBoolean( |
| 614 prefs::kAccessibilityEnabled)) { |
| 615 return false; |
| 616 } |
| 617 #endif |
| 618 |
608 std::map<views::Accelerator, int>::const_iterator iter = | 619 std::map<views::Accelerator, int>::const_iterator iter = |
609 accelerator_table_.find(accelerator); | 620 accelerator_table_.find(accelerator); |
610 DCHECK(iter != accelerator_table_.end()); | 621 DCHECK(iter != accelerator_table_.end()); |
611 int command_id = iter->second; | 622 int command_id = iter->second; |
612 | 623 |
613 if (!browser_->block_command_execution()) | 624 if (!browser_->block_command_execution()) |
614 UpdateAcceleratorMetrics(accelerator, command_id); | 625 UpdateAcceleratorMetrics(accelerator, command_id); |
615 return browser_->ExecuteCommandIfEnabled(command_id); | 626 return browser_->ExecuteCommandIfEnabled(command_id); |
616 } | 627 } |
617 | 628 |
(...skipping 1935 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2553 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)); | 2564 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)); |
2554 | 2565 |
2555 return view; | 2566 return view; |
2556 } | 2567 } |
2557 #endif | 2568 #endif |
2558 | 2569 |
2559 // static | 2570 // static |
2560 FindBar* BrowserWindow::CreateFindBar(Browser* browser) { | 2571 FindBar* BrowserWindow::CreateFindBar(Browser* browser) { |
2561 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window())); | 2572 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window())); |
2562 } | 2573 } |
OLD | NEW |