OLD | NEW |
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_command_controller.h" | 5 #include "chrome/browser/ui/browser_command_controller.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/prefs/pref_service.h" | 8 #include "base/prefs/pref_service.h" |
9 #include "chrome/app/chrome_command_ids.h" | 9 #include "chrome/app/chrome_command_ids.h" |
10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
(...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
555 case IDC_ADVANCED_PRINT: | 555 case IDC_ADVANCED_PRINT: |
556 content::RecordAction(base::UserMetricsAction("Accel_Advanced_Print")); | 556 content::RecordAction(base::UserMetricsAction("Accel_Advanced_Print")); |
557 AdvancedPrint(browser_); | 557 AdvancedPrint(browser_); |
558 break; | 558 break; |
559 case IDC_PRINT_TO_DESTINATION: | 559 case IDC_PRINT_TO_DESTINATION: |
560 PrintToDestination(browser_); | 560 PrintToDestination(browser_); |
561 break; | 561 break; |
562 case IDC_TRANSLATE_PAGE: | 562 case IDC_TRANSLATE_PAGE: |
563 Translate(browser_); | 563 Translate(browser_); |
564 break; | 564 break; |
565 case IDC_MANAGE_PASSWORDS_FOR_PAGE: | |
566 ManagePasswordsForPage(browser_); | |
567 break; | |
568 | |
569 // Page encoding commands | |
570 case IDC_ENCODING_AUTO_DETECT: | 565 case IDC_ENCODING_AUTO_DETECT: |
571 browser_->ToggleEncodingAutoDetect(); | 566 browser_->ToggleEncodingAutoDetect(); |
572 break; | 567 break; |
573 case IDC_ENCODING_UTF8: | 568 case IDC_ENCODING_UTF8: |
574 case IDC_ENCODING_UTF16LE: | 569 case IDC_ENCODING_UTF16LE: |
575 case IDC_ENCODING_ISO88591: | 570 case IDC_ENCODING_ISO88591: |
576 case IDC_ENCODING_WINDOWS1252: | 571 case IDC_ENCODING_WINDOWS1252: |
577 case IDC_ENCODING_GBK: | 572 case IDC_ENCODING_GBK: |
578 case IDC_ENCODING_GB18030: | 573 case IDC_ENCODING_GB18030: |
579 case IDC_ENCODING_BIG5HKSCS: | 574 case IDC_ENCODING_BIG5HKSCS: |
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
919 command_updater_.UpdateCommandEnabled(IDC_VISIT_DESKTOP_OF_LRU_USER_2, true); | 914 command_updater_.UpdateCommandEnabled(IDC_VISIT_DESKTOP_OF_LRU_USER_2, true); |
920 command_updater_.UpdateCommandEnabled(IDC_VISIT_DESKTOP_OF_LRU_USER_3, true); | 915 command_updater_.UpdateCommandEnabled(IDC_VISIT_DESKTOP_OF_LRU_USER_3, true); |
921 #endif | 916 #endif |
922 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) | 917 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
923 command_updater_.UpdateCommandEnabled(IDC_USE_SYSTEM_TITLE_BAR, true); | 918 command_updater_.UpdateCommandEnabled(IDC_USE_SYSTEM_TITLE_BAR, true); |
924 #endif | 919 #endif |
925 | 920 |
926 // Page-related commands | 921 // Page-related commands |
927 command_updater_.UpdateCommandEnabled(IDC_EMAIL_PAGE_LOCATION, true); | 922 command_updater_.UpdateCommandEnabled(IDC_EMAIL_PAGE_LOCATION, true); |
928 command_updater_.UpdateCommandEnabled(IDC_BOOKMARK_PAGE_FROM_STAR, true); | 923 command_updater_.UpdateCommandEnabled(IDC_BOOKMARK_PAGE_FROM_STAR, true); |
929 command_updater_.UpdateCommandEnabled(IDC_MANAGE_PASSWORDS_FOR_PAGE, true); | |
930 command_updater_.UpdateCommandEnabled(IDC_ENCODING_AUTO_DETECT, true); | 924 command_updater_.UpdateCommandEnabled(IDC_ENCODING_AUTO_DETECT, true); |
931 command_updater_.UpdateCommandEnabled(IDC_ENCODING_UTF8, true); | 925 command_updater_.UpdateCommandEnabled(IDC_ENCODING_UTF8, true); |
932 command_updater_.UpdateCommandEnabled(IDC_ENCODING_UTF16LE, true); | 926 command_updater_.UpdateCommandEnabled(IDC_ENCODING_UTF16LE, true); |
933 command_updater_.UpdateCommandEnabled(IDC_ENCODING_ISO88591, true); | 927 command_updater_.UpdateCommandEnabled(IDC_ENCODING_ISO88591, true); |
934 command_updater_.UpdateCommandEnabled(IDC_ENCODING_WINDOWS1252, true); | 928 command_updater_.UpdateCommandEnabled(IDC_ENCODING_WINDOWS1252, true); |
935 command_updater_.UpdateCommandEnabled(IDC_ENCODING_GBK, true); | 929 command_updater_.UpdateCommandEnabled(IDC_ENCODING_GBK, true); |
936 command_updater_.UpdateCommandEnabled(IDC_ENCODING_GB18030, true); | 930 command_updater_.UpdateCommandEnabled(IDC_ENCODING_GB18030, true); |
937 command_updater_.UpdateCommandEnabled(IDC_ENCODING_BIG5HKSCS, true); | 931 command_updater_.UpdateCommandEnabled(IDC_ENCODING_BIG5HKSCS, true); |
938 command_updater_.UpdateCommandEnabled(IDC_ENCODING_BIG5, true); | 932 command_updater_.UpdateCommandEnabled(IDC_ENCODING_BIG5, true); |
939 command_updater_.UpdateCommandEnabled(IDC_ENCODING_THAI, true); | 933 command_updater_.UpdateCommandEnabled(IDC_ENCODING_THAI, true); |
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1373 | 1367 |
1374 BrowserWindow* BrowserCommandController::window() { | 1368 BrowserWindow* BrowserCommandController::window() { |
1375 return browser_->window(); | 1369 return browser_->window(); |
1376 } | 1370 } |
1377 | 1371 |
1378 Profile* BrowserCommandController::profile() { | 1372 Profile* BrowserCommandController::profile() { |
1379 return browser_->profile(); | 1373 return browser_->profile(); |
1380 } | 1374 } |
1381 | 1375 |
1382 } // namespace chrome | 1376 } // namespace chrome |
OLD | NEW |