summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browser_main.cc
diff options
context:
space:
mode:
authorcpu@google.com <cpu@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-01 00:57:43 +0000
committercpu@google.com <cpu@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-01 00:57:43 +0000
commite37d90b84954ca9d6a1fb059637b94755039e6b6 (patch)
tree85c49531e1e0769105dcbbee454046881c709301 /chrome/browser/browser_main.cc
parente8a425bf301c3f27cc5344d94ad42e3fc89ed722 (diff)
downloadchromium_src-e37d90b84954ca9d6a1fb059637b94755039e6b6.zip
chromium_src-e37d90b84954ca9d6a1fb059637b94755039e6b6.tar.gz
chromium_src-e37d90b84954ca9d6a1fb059637b94755039e6b6.tar.bz2
Regression: task manager icon for chrome is blank
- During first run (confusing the newbie) - In other special situations when we show UI before the main chrome window is created BUG=14192 TEST=see bug Review URL: http://codereview.chromium.org/151061 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19692 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_main.cc')
-rw-r--r--chrome/browser/browser_main.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc
index 5a52734..cc39d22 100644
--- a/chrome/browser/browser_main.cc
+++ b/chrome/browser/browser_main.cc
@@ -77,7 +77,6 @@
// progress and should not be taken as an indication of a real refactoring.
#if defined(OS_WIN)
-
#include <windows.h>
#include <commctrl.h>
#include <shellapi.h>
@@ -93,6 +92,7 @@
#include "chrome/browser/printing/print_job_manager.h"
#include "chrome/browser/profile.h"
#include "chrome/browser/rlz/rlz.h"
+#include "chrome/browser/views/chrome_views_delegate.h"
#include "chrome/browser/views/user_data_dir_dialog.h"
#include "chrome/common/env_vars.h"
#include "chrome/installer/util/helper.h"
@@ -105,7 +105,6 @@
#include "net/http/http_network_layer.h"
#include "sandbox/src/sandbox.h"
#include "views/widget/accelerator_handler.h"
-
#endif // defined(OS_WIN)
#if defined(TOOLKIT_GTK)
@@ -377,8 +376,14 @@ int BrowserMain(const MainFunctionParams& parameters) {
// It is important for this to happen before the first run dialog, as it
// styles the dialog as well.
gtk_util::InitRCStyles();
+#elif defined(TOOLKIT_VIEWS)
+ // The delegate needs to be set before any UI is created so that windows
+ // display the correct icon.
+ if (!views::ViewsDelegate::views_delegate)
+ views::ViewsDelegate::views_delegate = new ChromeViewsDelegate;
#endif
+
#if defined(OS_POSIX)
// On Mac OS X / Linux we display the first run dialog as early as possible,
// so we can get the stats enabled.