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

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

Issue 27110: Allow JS Debugger shortcut to work in fullscreen mode, since there's no reaso... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 10 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 | no next file » | 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/browser.h" 5 #include "chrome/browser/browser.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/idle_timer.h" 8 #include "base/idle_timer.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 1978 matching lines...) Expand 10 before | Expand all | Expand 10 after
1989 command_updater_.UpdateCommandEnabled(IDC_SELECT_TAB_1, normal_window); 1989 command_updater_.UpdateCommandEnabled(IDC_SELECT_TAB_1, normal_window);
1990 command_updater_.UpdateCommandEnabled(IDC_SELECT_TAB_2, normal_window); 1990 command_updater_.UpdateCommandEnabled(IDC_SELECT_TAB_2, normal_window);
1991 command_updater_.UpdateCommandEnabled(IDC_SELECT_TAB_3, normal_window); 1991 command_updater_.UpdateCommandEnabled(IDC_SELECT_TAB_3, normal_window);
1992 command_updater_.UpdateCommandEnabled(IDC_SELECT_TAB_4, normal_window); 1992 command_updater_.UpdateCommandEnabled(IDC_SELECT_TAB_4, normal_window);
1993 command_updater_.UpdateCommandEnabled(IDC_SELECT_TAB_5, normal_window); 1993 command_updater_.UpdateCommandEnabled(IDC_SELECT_TAB_5, normal_window);
1994 command_updater_.UpdateCommandEnabled(IDC_SELECT_TAB_6, normal_window); 1994 command_updater_.UpdateCommandEnabled(IDC_SELECT_TAB_6, normal_window);
1995 command_updater_.UpdateCommandEnabled(IDC_SELECT_TAB_7, normal_window); 1995 command_updater_.UpdateCommandEnabled(IDC_SELECT_TAB_7, normal_window);
1996 command_updater_.UpdateCommandEnabled(IDC_SELECT_LAST_TAB, normal_window); 1996 command_updater_.UpdateCommandEnabled(IDC_SELECT_LAST_TAB, normal_window);
1997 command_updater_.UpdateCommandEnabled(IDC_RESTORE_TAB, 1997 command_updater_.UpdateCommandEnabled(IDC_RESTORE_TAB,
1998 normal_window && !profile_->IsOffTheRecord()); 1998 normal_window && !profile_->IsOffTheRecord());
1999
2000 // Show various bits of UI
2001 #if defined(OS_WIN)
2002 command_updater_.UpdateCommandEnabled(IDC_DEBUGGER,
2003 // The debugger doesn't work in single process mode.
2004 normal_window && !RenderProcessHost::run_renderer_in_process());
2005 #endif
1999 } 2006 }
2000 2007
2001 // Initialize other commands whose state changes based on fullscreen mode. 2008 // Initialize other commands whose state changes based on fullscreen mode.
2002 UpdateCommandsForFullscreenMode(false); 2009 UpdateCommandsForFullscreenMode(false);
2003 } 2010 }
2004 2011
2005 void Browser::UpdateCommandsForTabState() { 2012 void Browser::UpdateCommandsForTabState() {
2006 TabContents* current_tab = GetSelectedTabContents(); 2013 TabContents* current_tab = GetSelectedTabContents();
2007 if (!current_tab) // May be NULL during tab restore. 2014 if (!current_tab) // May be NULL during tab restore.
2008 return; 2015 return;
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
2067 command_updater_.UpdateCommandEnabled(IDC_SHOW_AS_TAB, 2074 command_updater_.UpdateCommandEnabled(IDC_SHOW_AS_TAB,
2068 (type() == TYPE_POPUP) && !is_fullscreen); 2075 (type() == TYPE_POPUP) && !is_fullscreen);
2069 2076
2070 // Focus various bits of UI 2077 // Focus various bits of UI
2071 command_updater_.UpdateCommandEnabled(IDC_FOCUS_TOOLBAR, show_main_ui); 2078 command_updater_.UpdateCommandEnabled(IDC_FOCUS_TOOLBAR, show_main_ui);
2072 command_updater_.UpdateCommandEnabled(IDC_FOCUS_LOCATION, show_main_ui); 2079 command_updater_.UpdateCommandEnabled(IDC_FOCUS_LOCATION, show_main_ui);
2073 command_updater_.UpdateCommandEnabled(IDC_FOCUS_SEARCH, show_main_ui); 2080 command_updater_.UpdateCommandEnabled(IDC_FOCUS_SEARCH, show_main_ui);
2074 2081
2075 // Show various bits of UI 2082 // Show various bits of UI
2076 command_updater_.UpdateCommandEnabled(IDC_DEVELOPER_MENU, show_main_ui); 2083 command_updater_.UpdateCommandEnabled(IDC_DEVELOPER_MENU, show_main_ui);
2077 #if defined(OS_WIN)
2078 command_updater_.UpdateCommandEnabled(IDC_DEBUGGER,
2079 // The debugger doesn't work in single process mode.
2080 show_main_ui && !RenderProcessHost::run_renderer_in_process());
2081 #endif
2082 command_updater_.UpdateCommandEnabled(IDC_NEW_PROFILE, show_main_ui); 2084 command_updater_.UpdateCommandEnabled(IDC_NEW_PROFILE, show_main_ui);
2083 command_updater_.UpdateCommandEnabled(IDC_REPORT_BUG, show_main_ui); 2085 command_updater_.UpdateCommandEnabled(IDC_REPORT_BUG, show_main_ui);
2084 command_updater_.UpdateCommandEnabled(IDC_SHOW_BOOKMARK_BAR, show_main_ui); 2086 command_updater_.UpdateCommandEnabled(IDC_SHOW_BOOKMARK_BAR, show_main_ui);
2085 command_updater_.UpdateCommandEnabled(IDC_CLEAR_BROWSING_DATA, show_main_ui); 2087 command_updater_.UpdateCommandEnabled(IDC_CLEAR_BROWSING_DATA, show_main_ui);
2086 command_updater_.UpdateCommandEnabled(IDC_IMPORT_SETTINGS, show_main_ui); 2088 command_updater_.UpdateCommandEnabled(IDC_IMPORT_SETTINGS, show_main_ui);
2087 command_updater_.UpdateCommandEnabled(IDC_OPTIONS, show_main_ui); 2089 command_updater_.UpdateCommandEnabled(IDC_OPTIONS, show_main_ui);
2088 command_updater_.UpdateCommandEnabled(IDC_EDIT_SEARCH_ENGINES, show_main_ui); 2090 command_updater_.UpdateCommandEnabled(IDC_EDIT_SEARCH_ENGINES, show_main_ui);
2089 command_updater_.UpdateCommandEnabled(IDC_VIEW_PASSWORDS, show_main_ui); 2091 command_updater_.UpdateCommandEnabled(IDC_VIEW_PASSWORDS, show_main_ui);
2090 command_updater_.UpdateCommandEnabled(IDC_ABOUT, show_main_ui); 2092 command_updater_.UpdateCommandEnabled(IDC_ABOUT, show_main_ui);
2091 } 2093 }
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
2418 2420
2419 // We need to register the window position pref. 2421 // We need to register the window position pref.
2420 std::wstring window_pref(prefs::kBrowserWindowPlacement); 2422 std::wstring window_pref(prefs::kBrowserWindowPlacement);
2421 window_pref.append(L"_"); 2423 window_pref.append(L"_");
2422 window_pref.append(app_name); 2424 window_pref.append(app_name);
2423 PrefService* prefs = g_browser_process->local_state(); 2425 PrefService* prefs = g_browser_process->local_state();
2424 DCHECK(prefs); 2426 DCHECK(prefs);
2425 2427
2426 prefs->RegisterDictionaryPref(window_pref.c_str()); 2428 prefs->RegisterDictionaryPref(window_pref.c_str());
2427 } 2429 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698