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 <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <memory> | 10 #include <memory> |
(...skipping 1590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1601 web_contents_close_handler_->WillCloseAllTabs(); | 1601 web_contents_close_handler_->WillCloseAllTabs(); |
1602 } | 1602 } |
1603 | 1603 |
1604 void BrowserView::CloseAllTabsCanceled() { | 1604 void BrowserView::CloseAllTabsCanceled() { |
1605 web_contents_close_handler_->CloseAllTabsCanceled(); | 1605 web_contents_close_handler_->CloseAllTabsCanceled(); |
1606 } | 1606 } |
1607 | 1607 |
1608 /////////////////////////////////////////////////////////////////////////////// | 1608 /////////////////////////////////////////////////////////////////////////////// |
1609 // BrowserView, ui::AcceleratorProvider implementation: | 1609 // BrowserView, ui::AcceleratorProvider implementation: |
1610 | 1610 |
1611 bool BrowserView::GetAcceleratorForCommandId(int command_id, | 1611 bool BrowserView::GetAcceleratorForCommandId( |
1612 ui::Accelerator* accelerator) { | 1612 int command_id, |
| 1613 ui::Accelerator* accelerator) const { |
1613 // Let's let the ToolbarView own the canonical implementation of this method. | 1614 // Let's let the ToolbarView own the canonical implementation of this method. |
1614 return toolbar_->GetAcceleratorForCommandId(command_id, accelerator); | 1615 return toolbar_->GetAcceleratorForCommandId(command_id, accelerator); |
1615 } | 1616 } |
1616 | 1617 |
1617 /////////////////////////////////////////////////////////////////////////////// | 1618 /////////////////////////////////////////////////////////////////////////////// |
1618 // BrowserView, views::WidgetDelegate implementation: | 1619 // BrowserView, views::WidgetDelegate implementation: |
1619 | 1620 |
1620 bool BrowserView::CanResize() const { | 1621 bool BrowserView::CanResize() const { |
1621 return true; | 1622 return true; |
1622 } | 1623 } |
(...skipping 1030 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2653 } | 2654 } |
2654 | 2655 |
2655 extensions::ActiveTabPermissionGranter* | 2656 extensions::ActiveTabPermissionGranter* |
2656 BrowserView::GetActiveTabPermissionGranter() { | 2657 BrowserView::GetActiveTabPermissionGranter() { |
2657 content::WebContents* web_contents = GetActiveWebContents(); | 2658 content::WebContents* web_contents = GetActiveWebContents(); |
2658 if (!web_contents) | 2659 if (!web_contents) |
2659 return nullptr; | 2660 return nullptr; |
2660 return extensions::TabHelper::FromWebContents(web_contents) | 2661 return extensions::TabHelper::FromWebContents(web_contents) |
2661 ->active_tab_permission_granter(); | 2662 ->active_tab_permission_granter(); |
2662 } | 2663 } |
OLD | NEW |