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