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 |
565 case IDC_ENCODING_AUTO_DETECT: | 570 case IDC_ENCODING_AUTO_DETECT: |
566 browser_->ToggleEncodingAutoDetect(); | 571 browser_->ToggleEncodingAutoDetect(); |
567 break; | 572 break; |
568 case IDC_ENCODING_UTF8: | 573 case IDC_ENCODING_UTF8: |
569 case IDC_ENCODING_UTF16LE: | 574 case IDC_ENCODING_UTF16LE: |
570 case IDC_ENCODING_ISO88591: | 575 case IDC_ENCODING_ISO88591: |
571 case IDC_ENCODING_WINDOWS1252: | 576 case IDC_ENCODING_WINDOWS1252: |
572 case IDC_ENCODING_GBK: | 577 case IDC_ENCODING_GBK: |
573 case IDC_ENCODING_GB18030: | 578 case IDC_ENCODING_GB18030: |
574 case IDC_ENCODING_BIG5HKSCS: | 579 case IDC_ENCODING_BIG5HKSCS: |
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
914 command_updater_.UpdateCommandEnabled(IDC_VISIT_DESKTOP_OF_LRU_USER_2, true); | 919 command_updater_.UpdateCommandEnabled(IDC_VISIT_DESKTOP_OF_LRU_USER_2, true); |
915 command_updater_.UpdateCommandEnabled(IDC_VISIT_DESKTOP_OF_LRU_USER_3, true); | 920 command_updater_.UpdateCommandEnabled(IDC_VISIT_DESKTOP_OF_LRU_USER_3, true); |
916 #endif | 921 #endif |
917 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) | 922 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
918 command_updater_.UpdateCommandEnabled(IDC_USE_SYSTEM_TITLE_BAR, true); | 923 command_updater_.UpdateCommandEnabled(IDC_USE_SYSTEM_TITLE_BAR, true); |
919 #endif | 924 #endif |
920 | 925 |
921 // Page-related commands | 926 // Page-related commands |
922 command_updater_.UpdateCommandEnabled(IDC_EMAIL_PAGE_LOCATION, true); | 927 command_updater_.UpdateCommandEnabled(IDC_EMAIL_PAGE_LOCATION, true); |
923 command_updater_.UpdateCommandEnabled(IDC_BOOKMARK_PAGE_FROM_STAR, true); | 928 command_updater_.UpdateCommandEnabled(IDC_BOOKMARK_PAGE_FROM_STAR, true); |
| 929 command_updater_.UpdateCommandEnabled(IDC_MANAGE_PASSWORDS_FOR_PAGE, true); |
924 command_updater_.UpdateCommandEnabled(IDC_ENCODING_AUTO_DETECT, true); | 930 command_updater_.UpdateCommandEnabled(IDC_ENCODING_AUTO_DETECT, true); |
925 command_updater_.UpdateCommandEnabled(IDC_ENCODING_UTF8, true); | 931 command_updater_.UpdateCommandEnabled(IDC_ENCODING_UTF8, true); |
926 command_updater_.UpdateCommandEnabled(IDC_ENCODING_UTF16LE, true); | 932 command_updater_.UpdateCommandEnabled(IDC_ENCODING_UTF16LE, true); |
927 command_updater_.UpdateCommandEnabled(IDC_ENCODING_ISO88591, true); | 933 command_updater_.UpdateCommandEnabled(IDC_ENCODING_ISO88591, true); |
928 command_updater_.UpdateCommandEnabled(IDC_ENCODING_WINDOWS1252, true); | 934 command_updater_.UpdateCommandEnabled(IDC_ENCODING_WINDOWS1252, true); |
929 command_updater_.UpdateCommandEnabled(IDC_ENCODING_GBK, true); | 935 command_updater_.UpdateCommandEnabled(IDC_ENCODING_GBK, true); |
930 command_updater_.UpdateCommandEnabled(IDC_ENCODING_GB18030, true); | 936 command_updater_.UpdateCommandEnabled(IDC_ENCODING_GB18030, true); |
931 command_updater_.UpdateCommandEnabled(IDC_ENCODING_BIG5HKSCS, true); | 937 command_updater_.UpdateCommandEnabled(IDC_ENCODING_BIG5HKSCS, true); |
932 command_updater_.UpdateCommandEnabled(IDC_ENCODING_BIG5, true); | 938 command_updater_.UpdateCommandEnabled(IDC_ENCODING_BIG5, true); |
933 command_updater_.UpdateCommandEnabled(IDC_ENCODING_THAI, true); | 939 command_updater_.UpdateCommandEnabled(IDC_ENCODING_THAI, true); |
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1367 | 1373 |
1368 BrowserWindow* BrowserCommandController::window() { | 1374 BrowserWindow* BrowserCommandController::window() { |
1369 return browser_->window(); | 1375 return browser_->window(); |
1370 } | 1376 } |
1371 | 1377 |
1372 Profile* BrowserCommandController::profile() { | 1378 Profile* BrowserCommandController::profile() { |
1373 return browser_->profile(); | 1379 return browser_->profile(); |
1374 } | 1380 } |
1375 | 1381 |
1376 } // namespace chrome | 1382 } // namespace chrome |
OLD | NEW |