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

Unified Diff: chrome/browser/views/frame/status_area_view.h

Issue 165272: Add a first attempt at a compact location bar and a status bar. The status ba... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/views/frame/browser_view.cc ('k') | chrome/browser/views/frame/status_area_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/frame/status_area_view.h
===================================================================
--- chrome/browser/views/frame/status_area_view.h (revision 0)
+++ chrome/browser/views/frame/status_area_view.h (revision 0)
@@ -0,0 +1,62 @@
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_VIEWS_FRAME_STATUS_AREA_VIEW_H_
+#define CHROME_BROWSER_VIEWS_FRAME_STATUS_AREA_VIEW_H_
+
+#include "base/basictypes.h"
+#include "views/controls/menu/simple_menu_model.h"
+#include "views/controls/menu/view_menu_delegate.h"
+#include "views/view.h"
+
+class Browser;
+
+namespace views {
+class MenuButton;
+class ImageView;
+}
+
+// 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 views::SimpleMenuModel::Delegate,
+ public views::ViewMenuDelegate {
+ public:
+ StatusAreaView(Browser* browser);
+ virtual ~StatusAreaView();
+
+ void Init();
+
+ // views::View* overrides.
+ virtual gfx::Size GetPreferredSize();
+ virtual void Layout();
+ virtual void Paint(gfx::Canvas* canvas);
+
+ private:
+ void CreateAppMenu();
+
+ // views::SimpleMenuModel::Delegate implementation.
+ virtual bool IsCommandIdChecked(int command_id) const;
+ virtual bool IsCommandIdEnabled(int command_id) const;
+ virtual bool GetAcceleratorForCommandId(int command_id,
+ views::Accelerator* accelerator);
+ virtual void ExecuteCommand(int command_id);
+
+ // views::ViewMenuDelegate implementation.
+ virtual void RunMenu(views::View* source, const gfx::Point& pt,
+ gfx::NativeView hwnd);
+
+ // The browser window that owns us.
+ Browser* browser_;
+
+ views::ImageView* battery_view_;
+ views::MenuButton* menu_view_;
+
+ scoped_ptr<views::SimpleMenuModel> app_menu_contents_;
+ scoped_ptr<views::Menu2> app_menu_menu_;
+
+ DISALLOW_COPY_AND_ASSIGN(StatusAreaView);
+};
+
+#endif // CHROME_BROWSER_VIEWS_FRAME_STATUS_AREA_VIEW_H_
Property changes on: chrome/browser/views/frame/status_area_view.h
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « chrome/browser/views/frame/browser_view.cc ('k') | chrome/browser/views/frame/status_area_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698