| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 // TODO(satorux): | 5 // TODO(satorux): |
| 6 // - Implement a scroll bar or an indicator showing where you are in the | 6 // - Implement a scroll bar or an indicator showing where you are in the |
| 7 // candidate window. | 7 // candidate window. |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 1027 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1038 // Initialize gtk stuff. | 1038 // Initialize gtk stuff. |
| 1039 g_thread_init(NULL); | 1039 g_thread_init(NULL); |
| 1040 g_type_init(); | 1040 g_type_init(); |
| 1041 gtk_init(&argc, &argv); | 1041 gtk_init(&argc, &argv); |
| 1042 | 1042 |
| 1043 // Initialize Chrome stuff. | 1043 // Initialize Chrome stuff. |
| 1044 base::AtExitManager exit_manager; | 1044 base::AtExitManager exit_manager; |
| 1045 base::EnableTerminationOnHeapCorruption(); | 1045 base::EnableTerminationOnHeapCorruption(); |
| 1046 app::RegisterPathProvider(); | 1046 app::RegisterPathProvider(); |
| 1047 CommandLine::Init(argc, argv); | 1047 CommandLine::Init(argc, argv); |
| 1048 // TODO(markusheintz): The command line switch --Lang is now processed |
| 1049 // by the CommandLinePrefStore and mapped to the preference |
| 1050 // prefs::kApplicationLocale. This preferences can be read through the |
| 1051 // PrefService. l10n_util::GetApplicationLocale() which is called by the |
| 1052 // ResourceBundle code now ignores the --Lang flag. |
| 1053 // In order to support the --Lang flag here the preference |
| 1054 // prefs::kApplicationLocale must be read and passed instead of L"en-US". |
| 1048 ResourceBundle::InitSharedInstance(L"en-US"); | 1055 ResourceBundle::InitSharedInstance(L"en-US"); |
| 1049 | 1056 |
| 1050 // Write logs to a file for debugging, if --logtofile=FILE_NAME is given. | 1057 // Write logs to a file for debugging, if --logtofile=FILE_NAME is given. |
| 1051 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 1058 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
| 1052 std::string log_file_name = | 1059 std::string log_file_name = |
| 1053 command_line.GetSwitchValueASCII(switches::kChromeosLogToFile); | 1060 command_line.GetSwitchValueASCII(switches::kChromeosLogToFile); |
| 1054 if (!log_file_name.empty()) { | 1061 if (!log_file_name.empty()) { |
| 1055 logging::SetMinLogLevel(logging::LOG_INFO); | 1062 logging::SetMinLogLevel(logging::LOG_INFO); |
| 1056 logging::InitLogging(log_file_name.c_str(), | 1063 logging::InitLogging(log_file_name.c_str(), |
| 1057 logging::LOG_ONLY_TO_FILE, | 1064 logging::LOG_ONLY_TO_FILE, |
| (...skipping 19 matching lines...) Expand all Loading... |
| 1077 // Create the candidate window controller. | 1084 // Create the candidate window controller. |
| 1078 chromeos::CandidateWindowController controller; | 1085 chromeos::CandidateWindowController controller; |
| 1079 controller.Init(); | 1086 controller.Init(); |
| 1080 | 1087 |
| 1081 // Start the main loop. | 1088 // Start the main loop. |
| 1082 views::AcceleratorHandler accelerator_handler; | 1089 views::AcceleratorHandler accelerator_handler; |
| 1083 MessageLoopForUI::current()->Run(&accelerator_handler); | 1090 MessageLoopForUI::current()->Run(&accelerator_handler); |
| 1084 | 1091 |
| 1085 return 0; | 1092 return 0; |
| 1086 } | 1093 } |
| OLD | NEW |