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 | |
645 WebContents* BrowserView::GetActiveWebContents() const { | 641 WebContents* BrowserView::GetActiveWebContents() const { |
646 return browser_->tab_strip_model()->GetActiveWebContents(); | 642 return browser_->tab_strip_model()->GetActiveWebContents(); |
647 } | 643 } |
648 | 644 |
649 gfx::ImageSkia BrowserView::GetOTRAvatarIcon() const { | 645 gfx::ImageSkia BrowserView::GetOTRAvatarIcon() const { |
650 return *GetThemeProvider()->GetImageSkiaNamed(GetOTRIconResourceID()); | 646 return *GetThemeProvider()->GetImageSkiaNamed(GetOTRIconResourceID()); |
651 } | 647 } |
652 | 648 |
653 bool BrowserView::IsPositionInWindowCaption(const gfx::Point& point) { | 649 bool BrowserView::IsPositionInWindowCaption(const gfx::Point& point) { |
654 if (window_switcher_button_) { | 650 if (window_switcher_button_) { |
(...skipping 2070 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2725 | 2721 |
2726 Browser* modal_browser = | 2722 Browser* modal_browser = |
2727 chrome::FindBrowserWithWebContents(active_dialog->web_contents()); | 2723 chrome::FindBrowserWithWebContents(active_dialog->web_contents()); |
2728 if (modal_browser && (browser_ != modal_browser)) { | 2724 if (modal_browser && (browser_ != modal_browser)) { |
2729 modal_browser->window()->FlashFrame(true); | 2725 modal_browser->window()->FlashFrame(true); |
2730 modal_browser->window()->Activate(); | 2726 modal_browser->window()->Activate(); |
2731 } | 2727 } |
2732 | 2728 |
2733 AppModalDialogQueue::GetInstance()->ActivateModalDialog(); | 2729 AppModalDialogQueue::GetInstance()->ActivateModalDialog(); |
2734 } | 2730 } |
OLD | NEW |