summaryrefslogtreecommitdiffstats
path: root/chrome/browser/chromeos/status_area_view.h
diff options
context:
space:
mode:
authoroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-16 21:49:19 +0000
committeroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-16 21:49:19 +0000
commit1d75cbe4106d9bfd4a3176b07fb15c0fb6ff0ab0 (patch)
tree8d481c82503469763a8c7e14a9c94f951118a3a3 /chrome/browser/chromeos/status_area_view.h
parent5d87c05ce71478dbed0be7e1e3ceb20d51252cb5 (diff)
downloadchromium_src-1d75cbe4106d9bfd4a3176b07fb15c0fb6ff0ab0.zip
chromium_src-1d75cbe4106d9bfd4a3176b07fb15c0fb6ff0ab0.tar.gz
chromium_src-1d75cbe4106d9bfd4a3176b07fb15c0fb6ff0ab0.tar.bz2
Fixes crash in toolkit_views. The problem with the current code is
that it assumed browser->window() was non-null, but with toolkit_views this ends up being called before window has been assigned. BUG=none TEST=none Review URL: http://codereview.chromium.org/290002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29333 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chromeos/status_area_view.h')
-rwxr-xr-xchrome/browser/chromeos/status_area_view.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/chrome/browser/chromeos/status_area_view.h b/chrome/browser/chromeos/status_area_view.h
index 8fbd5f5..071b99b 100755
--- a/chrome/browser/chromeos/status_area_view.h
+++ b/chrome/browser/chromeos/status_area_view.h
@@ -5,6 +5,7 @@
#ifndef CHROME_BROWSER_CHROMEOS_STATUS_AREA_VIEW_H_
#define CHROME_BROWSER_CHROMEOS_STATUS_AREA_VIEW_H_
+#include "app/gfx/native_widget_types.h"
#include "base/basictypes.h"
#include "views/controls/menu/simple_menu_model.h"
#include "views/controls/menu/view_menu_delegate.h"
@@ -31,7 +32,9 @@ class StatusAreaView : public views::View,
OPEN_TABS_ON_RIGHT
};
- explicit StatusAreaView(Browser* browser);
+ // NOTE: this takes the handle to the window as browser->window() may not
+ // have been assigned yet.
+ StatusAreaView(Browser* browser, gfx::NativeWindow window);
virtual ~StatusAreaView() {}
void Init();
@@ -60,6 +63,10 @@ class StatusAreaView : public views::View,
// The browser window that owns us.
Browser* browser_;
+ // Browser's NativeWindow. See description above constructor as to why this
+ // is cached.
+ gfx::NativeWindow window_;
+
ClockMenuButton* clock_view_;
NetworkMenuButton* network_view_;
PowerMenuButton* battery_view_;