Chromium Code Reviews| 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 73 #include "chrome/browser/ui/views/frame/top_container_view.h" | 73 #include "chrome/browser/ui/views/frame/top_container_view.h" |
| 74 #include "chrome/browser/ui/views/frame/web_contents_close_handler.h" | 74 #include "chrome/browser/ui/views/frame/web_contents_close_handler.h" |
| 75 #include "chrome/browser/ui/views/ime/ime_warning_bubble_view.h" | 75 #include "chrome/browser/ui/views/ime/ime_warning_bubble_view.h" |
| 76 #include "chrome/browser/ui/views/infobars/infobar_container_view.h" | 76 #include "chrome/browser/ui/views/infobars/infobar_container_view.h" |
| 77 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" | 77 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" |
| 78 #include "chrome/browser/ui/views/location_bar/location_icon_view.h" | 78 #include "chrome/browser/ui/views/location_bar/location_icon_view.h" |
| 79 #include "chrome/browser/ui/views/location_bar/star_view.h" | 79 #include "chrome/browser/ui/views/location_bar/star_view.h" |
| 80 #include "chrome/browser/ui/views/location_bar/zoom_bubble_view.h" | 80 #include "chrome/browser/ui/views/location_bar/zoom_bubble_view.h" |
| 81 #include "chrome/browser/ui/views/new_back_shortcut_bubble.h" | 81 #include "chrome/browser/ui/views/new_back_shortcut_bubble.h" |
| 82 #include "chrome/browser/ui/views/omnibox/omnibox_view_views.h" | 82 #include "chrome/browser/ui/views/omnibox/omnibox_view_views.h" |
| 83 #include "chrome/browser/ui/views/page_info/website_settings_popup_view.h" | 83 #include "chrome/browser/ui/views/page_info/page_info_popup_view.h" |
| 84 #include "chrome/browser/ui/views/profiles/profile_indicator_icon.h" | 84 #include "chrome/browser/ui/views/profiles/profile_indicator_icon.h" |
| 85 #include "chrome/browser/ui/views/status_bubble_views.h" | 85 #include "chrome/browser/ui/views/status_bubble_views.h" |
| 86 #include "chrome/browser/ui/views/tabs/browser_tab_strip_controller.h" | 86 #include "chrome/browser/ui/views/tabs/browser_tab_strip_controller.h" |
| 87 #include "chrome/browser/ui/views/tabs/tab.h" | 87 #include "chrome/browser/ui/views/tabs/tab.h" |
| 88 #include "chrome/browser/ui/views/tabs/tab_strip.h" | 88 #include "chrome/browser/ui/views/tabs/tab_strip.h" |
| 89 #include "chrome/browser/ui/views/toolbar/app_menu_button.h" | 89 #include "chrome/browser/ui/views/toolbar/app_menu_button.h" |
| 90 #include "chrome/browser/ui/views/toolbar/browser_actions_container.h" | 90 #include "chrome/browser/ui/views/toolbar/browser_actions_container.h" |
| 91 #include "chrome/browser/ui/views/toolbar/reload_button.h" | 91 #include "chrome/browser/ui/views/toolbar/reload_button.h" |
| 92 #include "chrome/browser/ui/views/toolbar/toolbar_view.h" | 92 #include "chrome/browser/ui/views/toolbar/toolbar_view.h" |
| 93 #include "chrome/browser/ui/views/translate/translate_bubble_view.h" | 93 #include "chrome/browser/ui/views/translate/translate_bubble_view.h" |
| (...skipping 1183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1277 bool app_modal, | 1277 bool app_modal, |
| 1278 const base::Callback<void(bool)>& callback) { | 1278 const base::Callback<void(bool)>& callback) { |
| 1279 DownloadInProgressDialogView::Show( | 1279 DownloadInProgressDialogView::Show( |
| 1280 GetNativeWindow(), download_count, dialog_type, app_modal, callback); | 1280 GetNativeWindow(), download_count, dialog_type, app_modal, callback); |
| 1281 } | 1281 } |
| 1282 | 1282 |
| 1283 void BrowserView::UserChangedTheme() { | 1283 void BrowserView::UserChangedTheme() { |
| 1284 frame_->FrameTypeChanged(); | 1284 frame_->FrameTypeChanged(); |
| 1285 } | 1285 } |
| 1286 | 1286 |
| 1287 void BrowserView::ShowWebsiteSettings( | 1287 void BrowserView::ShowWebsiteSettings( |
|
estark
2017/03/20 20:19:17
ShowWebsiteSettings => ShowPageInfo?
lgarron
2017/03/20 23:09:03
Hmm, I wanted to avoid renaming any classes or met
| |
| 1288 Profile* profile, | 1288 Profile* profile, |
| 1289 content::WebContents* web_contents, | 1289 content::WebContents* web_contents, |
| 1290 const GURL& virtual_url, | 1290 const GURL& virtual_url, |
| 1291 const security_state::SecurityInfo& security_info) { | 1291 const security_state::SecurityInfo& security_info) { |
| 1292 WebsiteSettingsPopupView::ShowPopup( | 1292 PageInfoPopupView::ShowPopup( |
| 1293 GetLocationBarView()->GetSecurityBubbleAnchorView(), gfx::Rect(), profile, | 1293 GetLocationBarView()->GetSecurityBubbleAnchorView(), gfx::Rect(), profile, |
| 1294 web_contents, virtual_url, security_info); | 1294 web_contents, virtual_url, security_info); |
| 1295 } | 1295 } |
| 1296 | 1296 |
| 1297 void BrowserView::ShowAppMenu() { | 1297 void BrowserView::ShowAppMenu() { |
| 1298 if (!toolbar_->app_menu_button()) | 1298 if (!toolbar_->app_menu_button()) |
| 1299 return; | 1299 return; |
| 1300 | 1300 |
| 1301 // Keep the top-of-window views revealed as long as the app menu is visible. | 1301 // Keep the top-of-window views revealed as long as the app menu is visible. |
| 1302 std::unique_ptr<ImmersiveRevealedLock> revealed_lock( | 1302 std::unique_ptr<ImmersiveRevealedLock> revealed_lock( |
| (...skipping 1369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2672 } | 2672 } |
| 2673 | 2673 |
| 2674 extensions::ActiveTabPermissionGranter* | 2674 extensions::ActiveTabPermissionGranter* |
| 2675 BrowserView::GetActiveTabPermissionGranter() { | 2675 BrowserView::GetActiveTabPermissionGranter() { |
| 2676 content::WebContents* web_contents = GetActiveWebContents(); | 2676 content::WebContents* web_contents = GetActiveWebContents(); |
| 2677 if (!web_contents) | 2677 if (!web_contents) |
| 2678 return nullptr; | 2678 return nullptr; |
| 2679 return extensions::TabHelper::FromWebContents(web_contents) | 2679 return extensions::TabHelper::FromWebContents(web_contents) |
| 2680 ->active_tab_permission_granter(); | 2680 ->active_tab_permission_granter(); |
| 2681 } | 2681 } |
| OLD | NEW |