summaryrefslogtreecommitdiffstats
path: root/chrome/browser/chromeos/status_area_view.h
diff options
context:
space:
mode:
authoravayvod@chromium.org <avayvod@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-02 18:55:36 +0000
committeravayvod@chromium.org <avayvod@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-02 18:55:36 +0000
commit527bb7f151b5f44c5274f9d27b13ee3b32ef9bf4 (patch)
treedadd3342a4240c2960bdd7160b4dde05d897b67c /chrome/browser/chromeos/status_area_view.h
parent0bbec1fd7a1db9865dc10902840272c5213e0daf (diff)
downloadchromium_src-527bb7f151b5f44c5274f9d27b13ee3b32ef9bf4.zip
chromium_src-527bb7f151b5f44c5274f9d27b13ee3b32ef9bf4.tar.gz
chromium_src-527bb7f151b5f44c5274f9d27b13ee3b32ef9bf4.tar.bz2
Made StatusAreaView and its buttons independent of BrowserWindow.
StatusAreaHost interface introduced so its other implementation can be used for login wizard status area. BUG=33197 TEST=No regression should be visible when logged in. Review URL: http://codereview.chromium.org/552215 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37854 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chromeos/status_area_view.h')
-rw-r--r--chrome/browser/chromeos/status_area_view.h41
1 files changed, 6 insertions, 35 deletions
diff --git a/chrome/browser/chromeos/status_area_view.h b/chrome/browser/chromeos/status_area_view.h
index 1eb9e10..bc2a758 100644
--- a/chrome/browser/chromeos/status_area_view.h
+++ b/chrome/browser/chromeos/status_area_view.h
@@ -5,29 +5,20 @@
#ifndef CHROME_BROWSER_CHROMEOS_STATUS_AREA_VIEW_H_
#define CHROME_BROWSER_CHROMEOS_STATUS_AREA_VIEW_H_
-#include "app/gfx/native_widget_types.h"
-#include "app/menus/simple_menu_model.h"
#include "base/basictypes.h"
-#include "views/controls/menu/view_menu_delegate.h"
-#include "views/controls/menu/menu_2.h"
#include "views/view.h"
-class AppMenuModel;
-class BrowserView;
-
namespace chromeos {
class ClockMenuButton;
class LanguageMenuButton;
class NetworkMenuButton;
class PowerMenuButton;
-class StatusAreaButton;
+class StatusAreaHost;
// This class is used to wrap the small informative widgets in the upper-right
// of the window title bar. It is used on ChromeOS only.
-class StatusAreaView : public views::View,
- public menus::SimpleMenuModel::Delegate,
- public views::ViewMenuDelegate {
+class StatusAreaView : public views::View {
public:
enum OpenTabsMode {
OPEN_TABS_ON_LEFT = 1,
@@ -35,18 +26,15 @@ class StatusAreaView : public views::View,
OPEN_TABS_ON_RIGHT
};
- explicit StatusAreaView(BrowserView* browser_view);
+ explicit StatusAreaView(StatusAreaHost* host);
virtual ~StatusAreaView() {}
- void Init();
+ virtual void Init();
// Called when the compact navigation bar mode has changed to
// toggle the app menu visibility.
void Update();
- // Creates an AppMenuModel for chromeos.
- AppMenuModel* CreateAppMenuModel(menus::SimpleMenuModel::Delegate* delegate);
-
// views::View* overrides.
virtual gfx::Size GetPreferredSize();
virtual void Layout();
@@ -55,29 +43,12 @@ class StatusAreaView : public views::View,
static void SetOpenTabsMode(OpenTabsMode mode);
private:
-
- // menus::SimpleMenuModel::Delegate implementation.
- virtual bool IsCommandIdChecked(int command_id) const;
- virtual bool IsCommandIdEnabled(int command_id) const;
- virtual bool GetAcceleratorForCommandId(int command_id,
- menus::Accelerator* accelerator);
- virtual void ExecuteCommand(int command_id);
-
- // views::ViewMenuDelegate implementation.
- virtual void RunMenu(views::View* source, const gfx::Point& pt);
-
- // The browser window that owns us.
- BrowserView* browser_view_;
+ StatusAreaHost* host_;
ClockMenuButton* clock_view_;
LanguageMenuButton* language_view_;
NetworkMenuButton* network_view_;
- PowerMenuButton* battery_view_;
- StatusAreaButton* menu_view_;
-
- scoped_ptr<menus::SimpleMenuModel> app_menu_contents_;
- scoped_ptr<menus::SimpleMenuModel> options_menu_contents_;
- scoped_ptr<views::Menu2> app_menu_menu_;
+ PowerMenuButton* power_view_;
static OpenTabsMode open_tabs_mode_;