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 1262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1273 } | 1273 } |
1274 | 1274 |
1275 void BrowserView::UserChangedTheme() { | 1275 void BrowserView::UserChangedTheme() { |
1276 frame_->FrameTypeChanged(); | 1276 frame_->FrameTypeChanged(); |
1277 } | 1277 } |
1278 | 1278 |
1279 void BrowserView::ShowWebsiteSettings( | 1279 void BrowserView::ShowWebsiteSettings( |
1280 Profile* profile, | 1280 Profile* profile, |
1281 content::WebContents* web_contents, | 1281 content::WebContents* web_contents, |
1282 const GURL& virtual_url, | 1282 const GURL& virtual_url, |
1283 const security_state::SecurityStateModel::SecurityInfo& security_info) { | 1283 const security_state::SecurityInfo& security_info) { |
1284 // Some browser windows have a location icon embedded in the frame. Try to | 1284 // Some browser windows have a location icon embedded in the frame. Try to |
1285 // use that if it exists. If it doesn't exist, use the location icon from | 1285 // use that if it exists. If it doesn't exist, use the location icon from |
1286 // the location bar. | 1286 // the location bar. |
1287 views::View* popup_anchor = | 1287 views::View* popup_anchor = |
1288 ui::MaterialDesignController::IsSecondaryUiMaterial() | 1288 ui::MaterialDesignController::IsSecondaryUiMaterial() |
1289 ? toolbar_->location_bar() | 1289 ? toolbar_->location_bar() |
1290 : frame_->GetLocationIconView(); | 1290 : frame_->GetLocationIconView(); |
1291 if (!popup_anchor) | 1291 if (!popup_anchor) |
1292 popup_anchor = GetLocationBarView()->location_icon_view()->GetImageView(); | 1292 popup_anchor = GetLocationBarView()->location_icon_view()->GetImageView(); |
1293 | 1293 |
(...skipping 1295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2589 } | 2589 } |
2590 | 2590 |
2591 extensions::ActiveTabPermissionGranter* | 2591 extensions::ActiveTabPermissionGranter* |
2592 BrowserView::GetActiveTabPermissionGranter() { | 2592 BrowserView::GetActiveTabPermissionGranter() { |
2593 content::WebContents* web_contents = GetActiveWebContents(); | 2593 content::WebContents* web_contents = GetActiveWebContents(); |
2594 if (!web_contents) | 2594 if (!web_contents) |
2595 return nullptr; | 2595 return nullptr; |
2596 return extensions::TabHelper::FromWebContents(web_contents) | 2596 return extensions::TabHelper::FromWebContents(web_contents) |
2597 ->active_tab_permission_granter(); | 2597 ->active_tab_permission_granter(); |
2598 } | 2598 } |
OLD | NEW |