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

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

Issue 2254273003: Remove text encoding UI (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
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_command_controller.h" 5 #include "chrome/browser/ui/browser_command_controller.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 case IDC_SAVE_CREDIT_CARD_FOR_PAGE: 467 case IDC_SAVE_CREDIT_CARD_FOR_PAGE:
468 SaveCreditCard(browser_); 468 SaveCreditCard(browser_);
469 break; 469 break;
470 case IDC_TRANSLATE_PAGE: 470 case IDC_TRANSLATE_PAGE:
471 Translate(browser_); 471 Translate(browser_);
472 break; 472 break;
473 case IDC_MANAGE_PASSWORDS_FOR_PAGE: 473 case IDC_MANAGE_PASSWORDS_FOR_PAGE:
474 ManagePasswordsForPage(browser_); 474 ManagePasswordsForPage(browser_);
475 break; 475 break;
476 476
477 // Page encoding commands
msw 2016/08/22 21:59:54 Can we remove these commands from chrome/app/chrom
Jinsuk Kim 2016/08/23 07:09:22 Please see my reply in character_encoding.cc
478 case IDC_ENCODING_AUTO_DETECT:
479 browser_->ToggleEncodingAutoDetect();
480 break;
481 case IDC_ENCODING_UTF8:
482 case IDC_ENCODING_UTF16LE:
483 case IDC_ENCODING_WINDOWS1252:
484 case IDC_ENCODING_GBK:
485 case IDC_ENCODING_GB18030:
486 case IDC_ENCODING_BIG5:
487 case IDC_ENCODING_KOREAN:
488 case IDC_ENCODING_SHIFTJIS:
489 case IDC_ENCODING_ISO2022JP:
490 case IDC_ENCODING_EUCJP:
491 case IDC_ENCODING_THAI:
492 case IDC_ENCODING_ISO885915:
493 case IDC_ENCODING_MACINTOSH:
494 case IDC_ENCODING_ISO88592:
495 case IDC_ENCODING_WINDOWS1250:
496 case IDC_ENCODING_ISO88595:
497 case IDC_ENCODING_WINDOWS1251:
498 case IDC_ENCODING_KOI8R:
499 case IDC_ENCODING_KOI8U:
500 case IDC_ENCODING_IBM866:
501 case IDC_ENCODING_ISO88597:
502 case IDC_ENCODING_WINDOWS1253:
503 case IDC_ENCODING_ISO88594:
504 case IDC_ENCODING_ISO885913:
505 case IDC_ENCODING_WINDOWS1257:
506 case IDC_ENCODING_ISO88593:
507 case IDC_ENCODING_ISO885910:
508 case IDC_ENCODING_ISO885914:
509 case IDC_ENCODING_ISO885916:
510 case IDC_ENCODING_WINDOWS1254:
511 case IDC_ENCODING_ISO88596:
512 case IDC_ENCODING_WINDOWS1256:
513 case IDC_ENCODING_ISO88598:
514 case IDC_ENCODING_ISO88598I:
515 case IDC_ENCODING_WINDOWS1255:
516 case IDC_ENCODING_WINDOWS1258:
517 browser_->OverrideEncoding(id);
518 break;
519
520 // Clipboard commands 477 // Clipboard commands
521 case IDC_CUT: 478 case IDC_CUT:
522 case IDC_COPY: 479 case IDC_COPY:
523 case IDC_PASTE: 480 case IDC_PASTE:
524 CutCopyPaste(browser_, id); 481 CutCopyPaste(browser_, id);
525 break; 482 break;
526 483
527 // Find-in-page 484 // Find-in-page
528 case IDC_FIND: 485 case IDC_FIND:
529 Find(browser_); 486 Find(browser_);
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
812 command_updater_.UpdateCommandEnabled(IDC_VISIT_DESKTOP_OF_LRU_USER_2, true); 769 command_updater_.UpdateCommandEnabled(IDC_VISIT_DESKTOP_OF_LRU_USER_2, true);
813 command_updater_.UpdateCommandEnabled(IDC_VISIT_DESKTOP_OF_LRU_USER_3, true); 770 command_updater_.UpdateCommandEnabled(IDC_VISIT_DESKTOP_OF_LRU_USER_3, true);
814 #endif 771 #endif
815 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) 772 #if defined(OS_LINUX) && !defined(OS_CHROMEOS)
816 command_updater_.UpdateCommandEnabled(IDC_USE_SYSTEM_TITLE_BAR, true); 773 command_updater_.UpdateCommandEnabled(IDC_USE_SYSTEM_TITLE_BAR, true);
817 #endif 774 #endif
818 775
819 // Page-related commands 776 // Page-related commands
820 command_updater_.UpdateCommandEnabled(IDC_EMAIL_PAGE_LOCATION, true); 777 command_updater_.UpdateCommandEnabled(IDC_EMAIL_PAGE_LOCATION, true);
821 command_updater_.UpdateCommandEnabled(IDC_MANAGE_PASSWORDS_FOR_PAGE, true); 778 command_updater_.UpdateCommandEnabled(IDC_MANAGE_PASSWORDS_FOR_PAGE, true);
822 command_updater_.UpdateCommandEnabled(IDC_ENCODING_AUTO_DETECT, true);
823 command_updater_.UpdateCommandEnabled(IDC_ENCODING_UTF8, true);
824 command_updater_.UpdateCommandEnabled(IDC_ENCODING_UTF16LE, true);
825 command_updater_.UpdateCommandEnabled(IDC_ENCODING_WINDOWS1252, true);
826 command_updater_.UpdateCommandEnabled(IDC_ENCODING_GBK, true);
827 command_updater_.UpdateCommandEnabled(IDC_ENCODING_GB18030, true);
828 command_updater_.UpdateCommandEnabled(IDC_ENCODING_BIG5, true);
829 command_updater_.UpdateCommandEnabled(IDC_ENCODING_THAI, true);
830 command_updater_.UpdateCommandEnabled(IDC_ENCODING_KOREAN, true);
831 command_updater_.UpdateCommandEnabled(IDC_ENCODING_SHIFTJIS, true);
832 command_updater_.UpdateCommandEnabled(IDC_ENCODING_ISO2022JP, true);
833 command_updater_.UpdateCommandEnabled(IDC_ENCODING_EUCJP, true);
834 command_updater_.UpdateCommandEnabled(IDC_ENCODING_ISO885915, true);
835 command_updater_.UpdateCommandEnabled(IDC_ENCODING_MACINTOSH, true);
836 command_updater_.UpdateCommandEnabled(IDC_ENCODING_ISO88592, true);
837 command_updater_.UpdateCommandEnabled(IDC_ENCODING_WINDOWS1250, true);
838 command_updater_.UpdateCommandEnabled(IDC_ENCODING_ISO88595, true);
839 command_updater_.UpdateCommandEnabled(IDC_ENCODING_WINDOWS1251, true);
840 command_updater_.UpdateCommandEnabled(IDC_ENCODING_KOI8R, true);
841 command_updater_.UpdateCommandEnabled(IDC_ENCODING_KOI8U, true);
842 command_updater_.UpdateCommandEnabled(IDC_ENCODING_IBM866, true);
843 command_updater_.UpdateCommandEnabled(IDC_ENCODING_ISO88597, true);
844 command_updater_.UpdateCommandEnabled(IDC_ENCODING_WINDOWS1253, true);
845 command_updater_.UpdateCommandEnabled(IDC_ENCODING_ISO88594, true);
846 command_updater_.UpdateCommandEnabled(IDC_ENCODING_ISO885913, true);
847 command_updater_.UpdateCommandEnabled(IDC_ENCODING_WINDOWS1257, true);
848 command_updater_.UpdateCommandEnabled(IDC_ENCODING_ISO88593, true);
849 command_updater_.UpdateCommandEnabled(IDC_ENCODING_ISO885910, true);
850 command_updater_.UpdateCommandEnabled(IDC_ENCODING_ISO885914, true);
851 command_updater_.UpdateCommandEnabled(IDC_ENCODING_ISO885916, true);
852 command_updater_.UpdateCommandEnabled(IDC_ENCODING_WINDOWS1254, true);
853 command_updater_.UpdateCommandEnabled(IDC_ENCODING_ISO88596, true);
854 command_updater_.UpdateCommandEnabled(IDC_ENCODING_WINDOWS1256, true);
855 command_updater_.UpdateCommandEnabled(IDC_ENCODING_ISO88598, true);
856 command_updater_.UpdateCommandEnabled(IDC_ENCODING_ISO88598I, true);
857 command_updater_.UpdateCommandEnabled(IDC_ENCODING_WINDOWS1255, true);
858 command_updater_.UpdateCommandEnabled(IDC_ENCODING_WINDOWS1258, true);
859 779
860 // Zoom 780 // Zoom
861 command_updater_.UpdateCommandEnabled(IDC_ZOOM_MENU, true); 781 command_updater_.UpdateCommandEnabled(IDC_ZOOM_MENU, true);
862 command_updater_.UpdateCommandEnabled(IDC_ZOOM_PLUS, true); 782 command_updater_.UpdateCommandEnabled(IDC_ZOOM_PLUS, true);
863 command_updater_.UpdateCommandEnabled(IDC_ZOOM_NORMAL, false); 783 command_updater_.UpdateCommandEnabled(IDC_ZOOM_NORMAL, false);
864 command_updater_.UpdateCommandEnabled(IDC_ZOOM_MINUS, true); 784 command_updater_.UpdateCommandEnabled(IDC_ZOOM_MINUS, true);
865 785
866 // Show various bits of UI 786 // Show various bits of UI
867 const bool guest_session = profile()->IsGuestSession() || 787 const bool guest_session = profile()->IsGuestSession() ||
868 profile()->IsSystemProfile(); 788 profile()->IsSystemProfile();
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
1264 1184
1265 BrowserWindow* BrowserCommandController::window() { 1185 BrowserWindow* BrowserCommandController::window() {
1266 return browser_->window(); 1186 return browser_->window();
1267 } 1187 }
1268 1188
1269 Profile* BrowserCommandController::profile() { 1189 Profile* BrowserCommandController::profile() {
1270 return browser_->profile(); 1190 return browser_->profile();
1271 } 1191 }
1272 1192
1273 } // namespace chrome 1193 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698