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

Side by Side Diff: chrome/browser/browser_main.cc

Issue 151061: Regression: task manager icon for chrome is blank... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/views/frame/browser_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "build/build_config.h" 5 #include "build/build_config.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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 #if defined(OS_LINUX) 69 #if defined(OS_LINUX)
70 #include "chrome/app/breakpad_linux.h" 70 #include "chrome/app/breakpad_linux.h"
71 #endif 71 #endif
72 72
73 // TODO(port): several win-only methods have been pulled out of this, but 73 // TODO(port): several win-only methods have been pulled out of this, but
74 // BrowserMain() as a whole needs to be broken apart so that it's usable by 74 // BrowserMain() as a whole needs to be broken apart so that it's usable by
75 // other platforms. For now, it's just a stub. This is a serious work in 75 // other platforms. For now, it's just a stub. This is a serious work in
76 // progress and should not be taken as an indication of a real refactoring. 76 // progress and should not be taken as an indication of a real refactoring.
77 77
78 #if defined(OS_WIN) 78 #if defined(OS_WIN)
79
80 #include <windows.h> 79 #include <windows.h>
81 #include <commctrl.h> 80 #include <commctrl.h>
82 #include <shellapi.h> 81 #include <shellapi.h>
83 82
84 #include "app/win_util.h" 83 #include "app/win_util.h"
85 #include "base/registry.h" 84 #include "base/registry.h"
86 #include "base/win_util.h" 85 #include "base/win_util.h"
87 #include "chrome/browser/browser.h" 86 #include "chrome/browser/browser.h"
88 #include "chrome/browser/browser_trial.h" 87 #include "chrome/browser/browser_trial.h"
89 #include "chrome/browser/extensions/extension_protocols.h" 88 #include "chrome/browser/extensions/extension_protocols.h"
90 #include "chrome/browser/jankometer.h" 89 #include "chrome/browser/jankometer.h"
91 #include "chrome/browser/metrics/user_metrics.h" 90 #include "chrome/browser/metrics/user_metrics.h"
92 #include "chrome/browser/net/url_fixer_upper.h" 91 #include "chrome/browser/net/url_fixer_upper.h"
93 #include "chrome/browser/printing/print_job_manager.h" 92 #include "chrome/browser/printing/print_job_manager.h"
94 #include "chrome/browser/profile.h" 93 #include "chrome/browser/profile.h"
95 #include "chrome/browser/rlz/rlz.h" 94 #include "chrome/browser/rlz/rlz.h"
95 #include "chrome/browser/views/chrome_views_delegate.h"
96 #include "chrome/browser/views/user_data_dir_dialog.h" 96 #include "chrome/browser/views/user_data_dir_dialog.h"
97 #include "chrome/common/env_vars.h" 97 #include "chrome/common/env_vars.h"
98 #include "chrome/installer/util/helper.h" 98 #include "chrome/installer/util/helper.h"
99 #include "chrome/installer/util/install_util.h" 99 #include "chrome/installer/util/install_util.h"
100 #include "chrome/installer/util/shell_util.h" 100 #include "chrome/installer/util/shell_util.h"
101 #include "chrome/installer/util/version.h" 101 #include "chrome/installer/util/version.h"
102 #include "net/base/net_util.h" 102 #include "net/base/net_util.h"
103 #include "net/base/sdch_manager.h" 103 #include "net/base/sdch_manager.h"
104 #include "net/base/winsock_init.h" 104 #include "net/base/winsock_init.h"
105 #include "net/http/http_network_layer.h" 105 #include "net/http/http_network_layer.h"
106 #include "sandbox/src/sandbox.h" 106 #include "sandbox/src/sandbox.h"
107 #include "views/widget/accelerator_handler.h" 107 #include "views/widget/accelerator_handler.h"
108
109 #endif // defined(OS_WIN) 108 #endif // defined(OS_WIN)
110 109
111 #if defined(LINUX2) 110 #if defined(LINUX2)
112 #include "chrome/browser/extensions/extension_protocols.h" 111 #include "chrome/browser/extensions/extension_protocols.h"
113 #endif // defined(LINUX2) 112 #endif // defined(LINUX2)
114 113
115 #if defined(TOOLKIT_GTK) 114 #if defined(TOOLKIT_GTK)
116 #include "chrome/common/gtk_util.h" 115 #include "chrome/common/gtk_util.h"
117 #endif 116 #endif
118 117
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 // Initialize ResourceBundle which handles files loaded from external 373 // Initialize ResourceBundle which handles files loaded from external
375 // sources. This has to be done before uninstall code path and before prefs 374 // sources. This has to be done before uninstall code path and before prefs
376 // are registered. 375 // are registered.
377 local_state->RegisterStringPref(prefs::kApplicationLocale, L""); 376 local_state->RegisterStringPref(prefs::kApplicationLocale, L"");
378 local_state->RegisterBooleanPref(prefs::kMetricsReportingEnabled, false); 377 local_state->RegisterBooleanPref(prefs::kMetricsReportingEnabled, false);
379 378
380 #if defined(TOOLKIT_GTK) 379 #if defined(TOOLKIT_GTK)
381 // It is important for this to happen before the first run dialog, as it 380 // It is important for this to happen before the first run dialog, as it
382 // styles the dialog as well. 381 // styles the dialog as well.
383 gtk_util::InitRCStyles(); 382 gtk_util::InitRCStyles();
383 #elif defined(TOOLKIT_VIEWS)
384 // The delegate needs to be set before any UI is created so that windows
385 // display the correct icon.
386 if (!views::ViewsDelegate::views_delegate)
387 views::ViewsDelegate::views_delegate = new ChromeViewsDelegate;
384 #endif 388 #endif
385 389
390
386 #if defined(OS_POSIX) 391 #if defined(OS_POSIX)
387 // On Mac OS X / Linux we display the first run dialog as early as possible, 392 // On Mac OS X / Linux we display the first run dialog as early as possible,
388 // so we can get the stats enabled. 393 // so we can get the stats enabled.
389 // TODO(port): 394 // TODO(port):
390 // We check the kNoFirstRun command line switch explicitly here since the 395 // We check the kNoFirstRun command line switch explicitly here since the
391 // early placement of this block happens before that's factored into 396 // early placement of this block happens before that's factored into
392 // first_run_ui_bypass, we probably want to move that block up 397 // first_run_ui_bypass, we probably want to move that block up
393 // and remove the explicit check from here in the long run. 398 // and remove the explicit check from here in the long run.
394 if (is_first_run && !first_run_ui_bypass && 399 if (is_first_run && !first_run_ui_bypass &&
395 !parsed_command_line.HasSwitch(switches::kNoFirstRun)) { 400 !parsed_command_line.HasSwitch(switches::kNoFirstRun)) {
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
825 if (metrics) 830 if (metrics)
826 metrics->Stop(); 831 metrics->Stop();
827 832
828 // browser_shutdown takes care of deleting browser_process, so we need to 833 // browser_shutdown takes care of deleting browser_process, so we need to
829 // release it. 834 // release it.
830 browser_process.release(); 835 browser_process.release();
831 browser_shutdown::Shutdown(); 836 browser_shutdown::Shutdown();
832 837
833 return result_code; 838 return result_code;
834 } 839 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/views/frame/browser_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698