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 #include "chrome/browser/browser_main.h" | 5 #include "chrome/browser/browser_main.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 #include "chrome/browser/metrics/user_metrics.h" | 116 #include "chrome/browser/metrics/user_metrics.h" |
117 #include "chrome/browser/net/url_fixer_upper.h" | 117 #include "chrome/browser/net/url_fixer_upper.h" |
118 #include "chrome/browser/rlz/rlz.h" | 118 #include "chrome/browser/rlz/rlz.h" |
119 #include "chrome/browser/views/user_data_dir_dialog.h" | 119 #include "chrome/browser/views/user_data_dir_dialog.h" |
120 #include "chrome/common/env_vars.h" | 120 #include "chrome/common/env_vars.h" |
121 #include "chrome/common/sandbox_policy.h" | 121 #include "chrome/common/sandbox_policy.h" |
122 #include "chrome/installer/util/helper.h" | 122 #include "chrome/installer/util/helper.h" |
123 #include "chrome/installer/util/install_util.h" | 123 #include "chrome/installer/util/install_util.h" |
124 #include "chrome/installer/util/shell_util.h" | 124 #include "chrome/installer/util/shell_util.h" |
125 #include "chrome/installer/util/version.h" | 125 #include "chrome/installer/util/version.h" |
| 126 #include "gfx/platform_font_win.h" |
126 #include "net/base/net_util.h" | 127 #include "net/base/net_util.h" |
127 #include "net/base/sdch_manager.h" | 128 #include "net/base/sdch_manager.h" |
128 #include "printing/printed_document.h" | 129 #include "printing/printed_document.h" |
129 #include "sandbox/src/sandbox.h" | 130 #include "sandbox/src/sandbox.h" |
130 #endif // defined(OS_WIN) | 131 #endif // defined(OS_WIN) |
131 | 132 |
132 #if defined(OS_MACOSX) | 133 #if defined(OS_MACOSX) |
133 #include <Security/Security.h> | 134 #include <Security/Security.h> |
134 #include "chrome/browser/cocoa/install_from_dmg.h" | 135 #include "chrome/browser/cocoa/install_from_dmg.h" |
135 #endif | 136 #endif |
(...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
699 gtk_util::InitRCStyles(); | 700 gtk_util::InitRCStyles(); |
700 } | 701 } |
701 #elif defined(TOOLKIT_VIEWS) | 702 #elif defined(TOOLKIT_VIEWS) |
702 void InitializeToolkit() { | 703 void InitializeToolkit() { |
703 // The delegate needs to be set before any UI is created so that windows | 704 // The delegate needs to be set before any UI is created so that windows |
704 // display the correct icon. | 705 // display the correct icon. |
705 if (!views::ViewsDelegate::views_delegate) | 706 if (!views::ViewsDelegate::views_delegate) |
706 views::ViewsDelegate::views_delegate = new ChromeViewsDelegate; | 707 views::ViewsDelegate::views_delegate = new ChromeViewsDelegate; |
707 | 708 |
708 #if defined(OS_WIN) | 709 #if defined(OS_WIN) |
709 gfx::Font::adjust_font_callback = &AdjustUIFont; | 710 gfx::PlatformFontWin::adjust_font_callback = &AdjustUIFont; |
710 gfx::Font::get_minimum_font_size_callback = &GetMinimumFontSize; | 711 gfx::PlatformFontWin::get_minimum_font_size_callback = &GetMinimumFontSize; |
711 | 712 |
712 // Init common control sex. | 713 // Init common control sex. |
713 INITCOMMONCONTROLSEX config; | 714 INITCOMMONCONTROLSEX config; |
714 config.dwSize = sizeof(config); | 715 config.dwSize = sizeof(config); |
715 config.dwICC = ICC_WIN95_CLASSES; | 716 config.dwICC = ICC_WIN95_CLASSES; |
716 InitCommonControlsEx(&config); | 717 InitCommonControlsEx(&config); |
717 #endif | 718 #endif |
718 } | 719 } |
719 #else | 720 #else |
720 void InitializeToolkit() { | 721 void InitializeToolkit() { |
(...skipping 726 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1447 metrics->Stop(); | 1448 metrics->Stop(); |
1448 | 1449 |
1449 // browser_shutdown takes care of deleting browser_process, so we need to | 1450 // browser_shutdown takes care of deleting browser_process, so we need to |
1450 // release it. | 1451 // release it. |
1451 ignore_result(browser_process.release()); | 1452 ignore_result(browser_process.release()); |
1452 browser_shutdown::Shutdown(); | 1453 browser_shutdown::Shutdown(); |
1453 | 1454 |
1454 TRACE_EVENT_END("BrowserMain", 0, 0); | 1455 TRACE_EVENT_END("BrowserMain", 0, 0); |
1455 return result_code; | 1456 return result_code; |
1456 } | 1457 } |
OLD | NEW |