Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(246)

Side by Side Diff: chrome/browser/ui/views/frame/browser_view.cc

Issue 13044014: Make sure manifest specified shortcut for Extension Command can not override the built-in shortcuts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mac's secondary shortcuts can be overwritten Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.h ('k') | chrome/chrome_browser_ui.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.h ('k') | chrome/chrome_browser_ui.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698