OLD | NEW |
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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_main.h" | 5 #include "chrome/browser/browser_main.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "app/l10n_util.h" | 9 #include "app/l10n_util.h" |
10 #include "app/resource_bundle.h" | 10 #include "app/resource_bundle.h" |
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
455 | 455 |
456 // If we're running tests (ui_task is non-null), then the ResourceBundle | 456 // If we're running tests (ui_task is non-null), then the ResourceBundle |
457 // has already been initialized. | 457 // has already been initialized. |
458 // Mac starts it earlier in Platform::WillInitializeMainMessageLoop (because | 458 // Mac starts it earlier in Platform::WillInitializeMainMessageLoop (because |
459 // it is needed when loading the MainMenu.nib and the language doesn't depend | 459 // it is needed when loading the MainMenu.nib and the language doesn't depend |
460 // on anything since it comes from Cocoa. | 460 // on anything since it comes from Cocoa. |
461 #if !defined(OS_MACOSX) | 461 #if !defined(OS_MACOSX) |
462 if (!parameters.ui_task) { | 462 if (!parameters.ui_task) { |
463 ResourceBundle::InitSharedInstance( | 463 ResourceBundle::InitSharedInstance( |
464 local_state->GetString(prefs::kApplicationLocale)); | 464 local_state->GetString(prefs::kApplicationLocale)); |
465 // We only load the theme dll in the browser process. | |
466 ResourceBundle::GetSharedInstance().LoadThemeResources(); | |
467 } | 465 } |
468 #endif // !defined(OS_MACOSX) | 466 #endif // !defined(OS_MACOSX) |
469 | 467 |
470 #if defined(OS_LINUX) | 468 #if defined(OS_LINUX) |
471 gtk_util::SetDefaultWindowIcon(); | 469 gtk_util::SetDefaultWindowIcon(); |
472 #endif | 470 #endif |
473 | 471 |
474 #if defined(OS_WIN) | 472 #if defined(OS_WIN) |
475 // This is experimental code. See first_run_win.cc for more info. | 473 // This is experimental code. See first_run_win.cc for more info. |
476 std::wstring try_chrome = | 474 std::wstring try_chrome = |
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
887 if (metrics) | 885 if (metrics) |
888 metrics->Stop(); | 886 metrics->Stop(); |
889 | 887 |
890 // browser_shutdown takes care of deleting browser_process, so we need to | 888 // browser_shutdown takes care of deleting browser_process, so we need to |
891 // release it. | 889 // release it. |
892 browser_process.release(); | 890 browser_process.release(); |
893 browser_shutdown::Shutdown(); | 891 browser_shutdown::Shutdown(); |
894 | 892 |
895 return result_code; | 893 return result_code; |
896 } | 894 } |
OLD | NEW |