Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(421)

Side by Side Diff: chrome/browser/ui/browser_commands.cc

Issue 2754383004: Rename WebsiteSettings code to PageInfo. (Closed)
Patch Set: Upload missing comment fix for WebSettingsUI -> PageInfoUI. Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/ui/browser_commands.h ('k') | chrome/browser/ui/browser_dialogs.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/browser_commands.h" 5 #include "chrome/browser/ui/browser_commands.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/metrics/histogram_macros.h" 8 #include "base/metrics/histogram_macros.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 879 matching lines...) Expand 10 before | Expand all | Expand 10 after
890 return false; 890 return false;
891 } 891 }
892 return !browser->is_devtools() && 892 return !browser->is_devtools() &&
893 !(GetContentRestrictions(browser) & CONTENT_RESTRICTION_SAVE); 893 !(GetContentRestrictions(browser) & CONTENT_RESTRICTION_SAVE);
894 } 894 }
895 895
896 void ShowFindBar(Browser* browser) { 896 void ShowFindBar(Browser* browser) {
897 browser->GetFindBarController()->Show(); 897 browser->GetFindBarController()->Show();
898 } 898 }
899 899
900 bool ShowWebsiteSettings(Browser* browser, content::WebContents* web_contents) { 900 bool ShowPageInfo(Browser* browser, content::WebContents* web_contents) {
901 content::NavigationEntry* entry = 901 content::NavigationEntry* entry =
902 web_contents->GetController().GetVisibleEntry(); 902 web_contents->GetController().GetVisibleEntry();
903 if (!entry) 903 if (!entry)
904 return false; 904 return false;
905 905
906 SecurityStateTabHelper* helper = 906 SecurityStateTabHelper* helper =
907 SecurityStateTabHelper::FromWebContents(web_contents); 907 SecurityStateTabHelper::FromWebContents(web_contents);
908 security_state::SecurityInfo security_info; 908 security_state::SecurityInfo security_info;
909 helper->GetSecurityInfo(&security_info); 909 helper->GetSecurityInfo(&security_info);
910 910
911 browser->window()->ShowWebsiteSettings( 911 browser->window()->ShowPageInfo(
912 Profile::FromBrowserContext(web_contents->GetBrowserContext()), 912 Profile::FromBrowserContext(web_contents->GetBrowserContext()),
913 web_contents, entry->GetVirtualURL(), security_info); 913 web_contents, entry->GetVirtualURL(), security_info);
914 return true; 914 return true;
915 } 915 }
916 916
917 void Print(Browser* browser) { 917 void Print(Browser* browser) {
918 #if BUILDFLAG(ENABLE_PRINTING) 918 #if BUILDFLAG(ENABLE_PRINTING)
919 auto* web_contents = browser->tab_strip_model()->GetActiveWebContents(); 919 auto* web_contents = browser->tab_strip_model()->GetActiveWebContents();
920 printing::StartPrint(web_contents, browser->profile()->GetPrefs()->GetBoolean( 920 printing::StartPrint(web_contents, browser->profile()->GetPrefs()->GetBoolean(
921 prefs::kPrintPreviewDisabled), 921 prefs::kPrintPreviewDisabled),
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
1334 true)); 1334 true));
1335 app_browser->tab_strip_model()->AppendWebContents(contents, true); 1335 app_browser->tab_strip_model()->AppendWebContents(contents, true);
1336 1336
1337 contents->GetMutableRendererPrefs()->can_accept_load_drops = false; 1337 contents->GetMutableRendererPrefs()->can_accept_load_drops = false;
1338 contents->GetRenderViewHost()->SyncRendererPrefs(); 1338 contents->GetRenderViewHost()->SyncRendererPrefs();
1339 app_browser->window()->Show(); 1339 app_browser->window()->Show();
1340 } 1340 }
1341 #endif // BUILDFLAG(ENABLE_EXTENSIONS) 1341 #endif // BUILDFLAG(ENABLE_EXTENSIONS)
1342 1342
1343 } // namespace chrome 1343 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_commands.h ('k') | chrome/browser/ui/browser_dialogs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698