| 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 1211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1222 if (immersive_mode_controller_->ShouldHideTopViews()) | 1222 if (immersive_mode_controller_->ShouldHideTopViews()) |
| 1223 return false; | 1223 return false; |
| 1224 // It's possible to reach here before we've been notified of being added to a | 1224 // It's possible to reach here before we've been notified of being added to a |
| 1225 // widget, so |toolbar_| is still null. Return false in this case so callers | 1225 // widget, so |toolbar_| is still null. Return false in this case so callers |
| 1226 // don't assume they can access the toolbar yet. | 1226 // don't assume they can access the toolbar yet. |
| 1227 return (browser_->SupportsWindowFeature(Browser::FEATURE_TOOLBAR) || | 1227 return (browser_->SupportsWindowFeature(Browser::FEATURE_TOOLBAR) || |
| 1228 browser_->SupportsWindowFeature(Browser::FEATURE_LOCATIONBAR)) && | 1228 browser_->SupportsWindowFeature(Browser::FEATURE_LOCATIONBAR)) && |
| 1229 toolbar_; | 1229 toolbar_; |
| 1230 } | 1230 } |
| 1231 | 1231 |
| 1232 gfx::Rect BrowserView::GetRootWindowResizerRect() const { | |
| 1233 // Views does not support resizer rects because they caused page cycler | |
| 1234 // performance regressions when they were added. See crrev.com/9654 | |
| 1235 return gfx::Rect(); | |
| 1236 } | |
| 1237 | |
| 1238 void BrowserView::ShowUpdateChromeDialog() { | 1232 void BrowserView::ShowUpdateChromeDialog() { |
| 1239 UpdateRecommendedMessageBox::Show(GetNativeWindow()); | 1233 UpdateRecommendedMessageBox::Show(GetNativeWindow()); |
| 1240 } | 1234 } |
| 1241 | 1235 |
| 1242 void BrowserView::ShowBookmarkBubble(const GURL& url, bool already_bookmarked) { | 1236 void BrowserView::ShowBookmarkBubble(const GURL& url, bool already_bookmarked) { |
| 1243 toolbar_->ShowBookmarkBubble(url, already_bookmarked, | 1237 toolbar_->ShowBookmarkBubble(url, already_bookmarked, |
| 1244 bookmark_bar_view_.get()); | 1238 bookmark_bar_view_.get()); |
| 1245 } | 1239 } |
| 1246 | 1240 |
| 1247 void BrowserView::ShowBookmarkAppBubble( | 1241 void BrowserView::ShowBookmarkAppBubble( |
| (...skipping 1407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2655 } | 2649 } |
| 2656 | 2650 |
| 2657 extensions::ActiveTabPermissionGranter* | 2651 extensions::ActiveTabPermissionGranter* |
| 2658 BrowserView::GetActiveTabPermissionGranter() { | 2652 BrowserView::GetActiveTabPermissionGranter() { |
| 2659 content::WebContents* web_contents = GetActiveWebContents(); | 2653 content::WebContents* web_contents = GetActiveWebContents(); |
| 2660 if (!web_contents) | 2654 if (!web_contents) |
| 2661 return nullptr; | 2655 return nullptr; |
| 2662 return extensions::TabHelper::FromWebContents(web_contents) | 2656 return extensions::TabHelper::FromWebContents(web_contents) |
| 2663 ->active_tab_permission_granter(); | 2657 ->active_tab_permission_granter(); |
| 2664 } | 2658 } |
| OLD | NEW |