OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
631 if (it->second == cmd_id) { | 631 if (it->second == cmd_id) { |
632 *accelerator = it->first; | 632 *accelerator = it->first; |
633 return true; | 633 return true; |
634 } | 634 } |
635 } | 635 } |
636 // Else, we retrieve the accelerator information from Ash (if applicable). | 636 // Else, we retrieve the accelerator information from Ash (if applicable). |
637 return chrome::GetAshAcceleratorForCommandId( | 637 return chrome::GetAshAcceleratorForCommandId( |
638 cmd_id, browser_->host_desktop_type(), accelerator); | 638 cmd_id, browser_->host_desktop_type(), accelerator); |
639 } | 639 } |
640 | 640 |
| 641 bool BrowserView::IsAcceleratorRegistered(const ui::Accelerator& accelerator) { |
| 642 return accelerator_table_.find(accelerator) != accelerator_table_.end(); |
| 643 } |
| 644 |
641 WebContents* BrowserView::GetActiveWebContents() const { | 645 WebContents* BrowserView::GetActiveWebContents() const { |
642 return browser_->tab_strip_model()->GetActiveWebContents(); | 646 return browser_->tab_strip_model()->GetActiveWebContents(); |
643 } | 647 } |
644 | 648 |
645 gfx::ImageSkia BrowserView::GetOTRAvatarIcon() const { | 649 gfx::ImageSkia BrowserView::GetOTRAvatarIcon() const { |
646 return *GetThemeProvider()->GetImageSkiaNamed(GetOTRIconResourceID()); | 650 return *GetThemeProvider()->GetImageSkiaNamed(GetOTRIconResourceID()); |
647 } | 651 } |
648 | 652 |
649 bool BrowserView::IsPositionInWindowCaption(const gfx::Point& point) { | 653 bool BrowserView::IsPositionInWindowCaption(const gfx::Point& point) { |
650 if (window_switcher_button_) { | 654 if (window_switcher_button_) { |
(...skipping 2074 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2725 | 2729 |
2726 Browser* modal_browser = | 2730 Browser* modal_browser = |
2727 chrome::FindBrowserWithWebContents(active_dialog->web_contents()); | 2731 chrome::FindBrowserWithWebContents(active_dialog->web_contents()); |
2728 if (modal_browser && (browser_ != modal_browser)) { | 2732 if (modal_browser && (browser_ != modal_browser)) { |
2729 modal_browser->window()->FlashFrame(true); | 2733 modal_browser->window()->FlashFrame(true); |
2730 modal_browser->window()->Activate(); | 2734 modal_browser->window()->Activate(); |
2731 } | 2735 } |
2732 | 2736 |
2733 AppModalDialogQueue::GetInstance()->ActivateModalDialog(); | 2737 AppModalDialogQueue::GetInstance()->ActivateModalDialog(); |
2734 } | 2738 } |
OLD | NEW |