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

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

Issue 10823002: Enable the Website Setting UI by default on Windows (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Enable the Website Settings by default on windows. Created 8 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/common/chrome_switches.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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.h" 8 #include "base/metrics/histogram.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/browser/bookmarks/bookmark_editor.h" 10 #include "chrome/browser/bookmarks/bookmark_editor.h"
(...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after
630 630
631 void ShowPageInfo(Browser* browser, 631 void ShowPageInfo(Browser* browser,
632 content::WebContents* web_contents, 632 content::WebContents* web_contents,
633 const GURL& url, 633 const GURL& url,
634 const SSLStatus& ssl, 634 const SSLStatus& ssl,
635 bool show_history) { 635 bool show_history) {
636 Profile* profile = Profile::FromBrowserContext( 636 Profile* profile = Profile::FromBrowserContext(
637 web_contents->GetBrowserContext()); 637 web_contents->GetBrowserContext());
638 TabContents* tab_contents = TabContents::FromWebContents(web_contents); 638 TabContents* tab_contents = TabContents::FromWebContents(web_contents);
639 639
640 #if defined(OS_WIN)
641 bool website_settings_enabled = true;
640 if (CommandLine::ForCurrentProcess()->HasSwitch( 642 if (CommandLine::ForCurrentProcess()->HasSwitch(
641 switches::kEnableWebsiteSettings)) { 643 switches::kDisableWebsiteSettings))
644 website_settings_enabled = false;
645 #else
646 bool website_settings_enabled = false;
647 if (CommandLine::ForCurrentProcess()->HasSwitch(
648 switches::kEnableWebsiteSettings))
649 website_settings_enabled = true;
650 #endif
651 if (website_settings_enabled) {
642 browser->window()->ShowWebsiteSettings( 652 browser->window()->ShowWebsiteSettings(
643 profile, tab_contents, url, ssl, show_history); 653 profile, tab_contents, url, ssl, show_history);
644 } else { 654 } else {
645 browser->window()->ShowPageInfo(web_contents, url, ssl, show_history); 655 browser->window()->ShowPageInfo(web_contents, url, ssl, show_history);
646 } 656 }
647 } 657 }
648 658
649 void ShowChromeToMobileBubble(Browser* browser) { 659 void ShowChromeToMobileBubble(Browser* browser) {
650 // Only show the bubble if the window is active, otherwise we may get into 660 // Only show the bubble if the window is active, otherwise we may get into
651 // weird situations where the bubble is deleted as soon as it is shown. 661 // weird situations where the bubble is deleted as soon as it is shown.
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
984 if (!tab_contents) 994 if (!tab_contents)
985 tab_contents = new TabContents(contents); 995 tab_contents = new TabContents(contents);
986 app_browser->tab_strip_model()->AppendTabContents(tab_contents, true); 996 app_browser->tab_strip_model()->AppendTabContents(tab_contents, true);
987 997
988 contents->GetMutableRendererPrefs()->can_accept_load_drops = false; 998 contents->GetMutableRendererPrefs()->can_accept_load_drops = false;
989 contents->GetRenderViewHost()->SyncRendererPrefs(); 999 contents->GetRenderViewHost()->SyncRendererPrefs();
990 app_browser->window()->Show(); 1000 app_browser->window()->Show();
991 } 1001 }
992 1002
993 } // namespace chrome 1003 } // namespace chrome
OLDNEW
« no previous file with comments | « no previous file | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698