| OLD | NEW |
| 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 1158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1169 case IDC_ENCODING_ISO885913: | 1169 case IDC_ENCODING_ISO885913: |
| 1170 case IDC_ENCODING_WINDOWS1257: | 1170 case IDC_ENCODING_WINDOWS1257: |
| 1171 case IDC_ENCODING_ISO88593: | 1171 case IDC_ENCODING_ISO88593: |
| 1172 case IDC_ENCODING_ISO885910: | 1172 case IDC_ENCODING_ISO885910: |
| 1173 case IDC_ENCODING_ISO885914: | 1173 case IDC_ENCODING_ISO885914: |
| 1174 case IDC_ENCODING_ISO885916: | 1174 case IDC_ENCODING_ISO885916: |
| 1175 case IDC_ENCODING_WINDOWS1254: | 1175 case IDC_ENCODING_WINDOWS1254: |
| 1176 case IDC_ENCODING_ISO88596: | 1176 case IDC_ENCODING_ISO88596: |
| 1177 case IDC_ENCODING_WINDOWS1256: | 1177 case IDC_ENCODING_WINDOWS1256: |
| 1178 case IDC_ENCODING_ISO88598: | 1178 case IDC_ENCODING_ISO88598: |
| 1179 case IDC_ENCODING_ISO88598I: |
| 1179 case IDC_ENCODING_WINDOWS1255: | 1180 case IDC_ENCODING_WINDOWS1255: |
| 1180 case IDC_ENCODING_WINDOWS1258: OverrideEncoding(id); break; | 1181 case IDC_ENCODING_WINDOWS1258: OverrideEncoding(id); break; |
| 1181 | 1182 |
| 1182 // Clipboard commands | 1183 // Clipboard commands |
| 1183 case IDC_CUT: Cut(); break; | 1184 case IDC_CUT: Cut(); break; |
| 1184 case IDC_COPY: Copy(); break; | 1185 case IDC_COPY: Copy(); break; |
| 1185 case IDC_COPY_URL: CopyCurrentPageURL(); break; | 1186 case IDC_COPY_URL: CopyCurrentPageURL(); break; |
| 1186 case IDC_PASTE: Paste(); break; | 1187 case IDC_PASTE: Paste(); break; |
| 1187 | 1188 |
| 1188 // Find-in-page | 1189 // Find-in-page |
| (...skipping 788 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1977 command_updater_.UpdateCommandEnabled(IDC_ENCODING_ISO885913, true); | 1978 command_updater_.UpdateCommandEnabled(IDC_ENCODING_ISO885913, true); |
| 1978 command_updater_.UpdateCommandEnabled(IDC_ENCODING_WINDOWS1257, true); | 1979 command_updater_.UpdateCommandEnabled(IDC_ENCODING_WINDOWS1257, true); |
| 1979 command_updater_.UpdateCommandEnabled(IDC_ENCODING_ISO88593, true); | 1980 command_updater_.UpdateCommandEnabled(IDC_ENCODING_ISO88593, true); |
| 1980 command_updater_.UpdateCommandEnabled(IDC_ENCODING_ISO885910, true); | 1981 command_updater_.UpdateCommandEnabled(IDC_ENCODING_ISO885910, true); |
| 1981 command_updater_.UpdateCommandEnabled(IDC_ENCODING_ISO885914, true); | 1982 command_updater_.UpdateCommandEnabled(IDC_ENCODING_ISO885914, true); |
| 1982 command_updater_.UpdateCommandEnabled(IDC_ENCODING_ISO885916, true); | 1983 command_updater_.UpdateCommandEnabled(IDC_ENCODING_ISO885916, true); |
| 1983 command_updater_.UpdateCommandEnabled(IDC_ENCODING_WINDOWS1254, true); | 1984 command_updater_.UpdateCommandEnabled(IDC_ENCODING_WINDOWS1254, true); |
| 1984 command_updater_.UpdateCommandEnabled(IDC_ENCODING_ISO88596, true); | 1985 command_updater_.UpdateCommandEnabled(IDC_ENCODING_ISO88596, true); |
| 1985 command_updater_.UpdateCommandEnabled(IDC_ENCODING_WINDOWS1256, true); | 1986 command_updater_.UpdateCommandEnabled(IDC_ENCODING_WINDOWS1256, true); |
| 1986 command_updater_.UpdateCommandEnabled(IDC_ENCODING_ISO88598, true); | 1987 command_updater_.UpdateCommandEnabled(IDC_ENCODING_ISO88598, true); |
| 1988 command_updater_.UpdateCommandEnabled(IDC_ENCODING_ISO88598I, true); |
| 1987 command_updater_.UpdateCommandEnabled(IDC_ENCODING_WINDOWS1255, true); | 1989 command_updater_.UpdateCommandEnabled(IDC_ENCODING_WINDOWS1255, true); |
| 1988 command_updater_.UpdateCommandEnabled(IDC_ENCODING_WINDOWS1258, true); | 1990 command_updater_.UpdateCommandEnabled(IDC_ENCODING_WINDOWS1258, true); |
| 1989 | 1991 |
| 1990 // Clipboard commands | 1992 // Clipboard commands |
| 1991 command_updater_.UpdateCommandEnabled(IDC_CUT, true); | 1993 command_updater_.UpdateCommandEnabled(IDC_CUT, true); |
| 1992 command_updater_.UpdateCommandEnabled(IDC_COPY, true); | 1994 command_updater_.UpdateCommandEnabled(IDC_COPY, true); |
| 1993 command_updater_.UpdateCommandEnabled(IDC_COPY_URL, true); | 1995 command_updater_.UpdateCommandEnabled(IDC_COPY_URL, true); |
| 1994 command_updater_.UpdateCommandEnabled(IDC_PASTE, true); | 1996 command_updater_.UpdateCommandEnabled(IDC_PASTE, true); |
| 1995 | 1997 |
| 1996 // Show various bits of UI | 1998 // Show various bits of UI |
| (...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2454 | 2456 |
| 2455 // We need to register the window position pref. | 2457 // We need to register the window position pref. |
| 2456 std::wstring window_pref(prefs::kBrowserWindowPlacement); | 2458 std::wstring window_pref(prefs::kBrowserWindowPlacement); |
| 2457 window_pref.append(L"_"); | 2459 window_pref.append(L"_"); |
| 2458 window_pref.append(app_name); | 2460 window_pref.append(app_name); |
| 2459 PrefService* prefs = g_browser_process->local_state(); | 2461 PrefService* prefs = g_browser_process->local_state(); |
| 2460 DCHECK(prefs); | 2462 DCHECK(prefs); |
| 2461 | 2463 |
| 2462 prefs->RegisterDictionaryPref(window_pref.c_str()); | 2464 prefs->RegisterDictionaryPref(window_pref.c_str()); |
| 2463 } | 2465 } |
| OLD | NEW |