| 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 2501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2512 } | 2512 } |
| 2513 | 2513 |
| 2514 int BrowserView::GetRenderViewHeightInsetWithDetachedBookmarkBar() { | 2514 int BrowserView::GetRenderViewHeightInsetWithDetachedBookmarkBar() { |
| 2515 if (browser_->bookmark_bar_state() != BookmarkBar::DETACHED || | 2515 if (browser_->bookmark_bar_state() != BookmarkBar::DETACHED || |
| 2516 !bookmark_bar_view_ || !bookmark_bar_view_->IsDetached()) { | 2516 !bookmark_bar_view_ || !bookmark_bar_view_->IsDetached()) { |
| 2517 return 0; | 2517 return 0; |
| 2518 } | 2518 } |
| 2519 // Don't use bookmark_bar_view_->height() which won't be the final height if | 2519 // Don't use bookmark_bar_view_->height() which won't be the final height if |
| 2520 // the bookmark bar is animating. | 2520 // the bookmark bar is animating. |
| 2521 return chrome::kNTPBookmarkBarHeight - | 2521 return chrome::kNTPBookmarkBarHeight - |
| 2522 views::NonClientFrameView::kClientEdgeThickness; | 2522 views::NonClientFrameView::kClientEdgeThickness; |
| 2523 } | 2523 } |
| 2524 | 2524 |
| 2525 void BrowserView::ExecuteExtensionCommand( | 2525 void BrowserView::ExecuteExtensionCommand( |
| 2526 const extensions::Extension* extension, | 2526 const extensions::Extension* extension, |
| 2527 const extensions::Command& command) { | 2527 const extensions::Command& command) { |
| 2528 extension_keybinding_registry_->ExecuteCommand(extension->id(), | 2528 extension_keybinding_registry_->ExecuteCommand(extension->id(), |
| 2529 command.accelerator()); | 2529 command.accelerator()); |
| 2530 } | 2530 } |
| 2531 | 2531 |
| 2532 ExclusiveAccessContext* BrowserView::GetExclusiveAccessContext() { | 2532 ExclusiveAccessContext* BrowserView::GetExclusiveAccessContext() { |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2656 } | 2656 } |
| 2657 | 2657 |
| 2658 extensions::ActiveTabPermissionGranter* | 2658 extensions::ActiveTabPermissionGranter* |
| 2659 BrowserView::GetActiveTabPermissionGranter() { | 2659 BrowserView::GetActiveTabPermissionGranter() { |
| 2660 content::WebContents* web_contents = GetActiveWebContents(); | 2660 content::WebContents* web_contents = GetActiveWebContents(); |
| 2661 if (!web_contents) | 2661 if (!web_contents) |
| 2662 return nullptr; | 2662 return nullptr; |
| 2663 return extensions::TabHelper::FromWebContents(web_contents) | 2663 return extensions::TabHelper::FromWebContents(web_contents) |
| 2664 ->active_tab_permission_granter(); | 2664 ->active_tab_permission_granter(); |
| 2665 } | 2665 } |
| OLD | NEW |