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 2506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2517 #endif | 2517 #endif |
2518 } | 2518 } |
2519 | 2519 |
2520 int BrowserView::GetRenderViewHeightInsetWithDetachedBookmarkBar() { | 2520 int BrowserView::GetRenderViewHeightInsetWithDetachedBookmarkBar() { |
2521 if (browser_->bookmark_bar_state() != BookmarkBar::DETACHED || | 2521 if (browser_->bookmark_bar_state() != BookmarkBar::DETACHED || |
2522 !bookmark_bar_view_ || !bookmark_bar_view_->IsDetached()) { | 2522 !bookmark_bar_view_ || !bookmark_bar_view_->IsDetached()) { |
2523 return 0; | 2523 return 0; |
2524 } | 2524 } |
2525 // Don't use bookmark_bar_view_->height() which won't be the final height if | 2525 // Don't use bookmark_bar_view_->height() which won't be the final height if |
2526 // the bookmark bar is animating. | 2526 // the bookmark bar is animating. |
2527 return chrome::kNTPBookmarkBarHeight - | 2527 return chrome::kNTPMinimumBookmarkBarHeight - |
2528 views::NonClientFrameView::kClientEdgeThickness; | 2528 views::NonClientFrameView::kClientEdgeThickness; |
2529 } | 2529 } |
2530 | 2530 |
2531 void BrowserView::ExecuteExtensionCommand( | 2531 void BrowserView::ExecuteExtensionCommand( |
2532 const extensions::Extension* extension, | 2532 const extensions::Extension* extension, |
2533 const extensions::Command& command) { | 2533 const extensions::Command& command) { |
2534 extension_keybinding_registry_->ExecuteCommand(extension->id(), | 2534 extension_keybinding_registry_->ExecuteCommand(extension->id(), |
2535 command.accelerator()); | 2535 command.accelerator()); |
2536 } | 2536 } |
2537 | 2537 |
2538 ExclusiveAccessContext* BrowserView::GetExclusiveAccessContext() { | 2538 ExclusiveAccessContext* BrowserView::GetExclusiveAccessContext() { |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2662 } | 2662 } |
2663 | 2663 |
2664 extensions::ActiveTabPermissionGranter* | 2664 extensions::ActiveTabPermissionGranter* |
2665 BrowserView::GetActiveTabPermissionGranter() { | 2665 BrowserView::GetActiveTabPermissionGranter() { |
2666 content::WebContents* web_contents = GetActiveWebContents(); | 2666 content::WebContents* web_contents = GetActiveWebContents(); |
2667 if (!web_contents) | 2667 if (!web_contents) |
2668 return nullptr; | 2668 return nullptr; |
2669 return extensions::TabHelper::FromWebContents(web_contents) | 2669 return extensions::TabHelper::FromWebContents(web_contents) |
2670 ->active_tab_permission_granter(); | 2670 ->active_tab_permission_granter(); |
2671 } | 2671 } |
OLD | NEW |