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

Unified Diff: ash/system/status_area_widget_delegate.h

Issue 10535112: Prepare status area to support multiple trays. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 6 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 | « ash/system/status_area_widget.cc ('k') | ash/system/status_area_widget_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/status_area_widget_delegate.h
diff --git a/ash/system/status_area_widget_delegate.h b/ash/system/status_area_widget_delegate.h
index 35228d4ab8f3e21f511170e02dd5e63d35b188fb..25b5b4044e0c5acb3affb629c99b670186639e13 100644
--- a/ash/system/status_area_widget_delegate.h
+++ b/ash/system/status_area_widget_delegate.h
@@ -7,9 +7,9 @@
#pragma once
#include "ash/ash_export.h"
+#include "ash/wm/shelf_auto_hide_behavior.h"
#include "ui/gfx/image/image_skia.h"
#include "ui/views/accessible_pane_view.h"
-#include "ui/views/layout/box_layout.h"
#include "ui/views/widget/widget_delegate.h"
namespace ash {
@@ -17,15 +17,23 @@ namespace internal {
class FocusCycler;
-class ASH_EXPORT StatusAreaWidgetDelegate : public views::WidgetDelegate,
- public views::AccessiblePaneView {
+class ASH_EXPORT StatusAreaWidgetDelegate : public views::AccessiblePaneView,
+ public views::WidgetDelegate {
public:
StatusAreaWidgetDelegate();
virtual ~StatusAreaWidgetDelegate();
+ // Add a tray view to the widget (e.g. system tray, web notifications).
+ void AddTray(views::View* tray);
+
+ // Called whenever layout might change (e.g. alignment changed).
+ void UpdateLayout();
+
// Sets the focus cycler.
void SetFocusCyclerForTesting(const FocusCycler* focus_cycler);
+ void set_alignment(ShelfAlignment alignment) { alignment_ = alignment; }
+
// Overridden from views::AccessiblePaneView.
virtual View* GetDefaultFocusableChild() OVERRIDE;
@@ -38,10 +46,13 @@ class ASH_EXPORT StatusAreaWidgetDelegate : public views::WidgetDelegate,
virtual bool CanActivate() const OVERRIDE;
virtual void DeleteDelegate() OVERRIDE;
- void SetLayout(views::BoxLayout::Orientation orientation);
+ protected:
+ // Overridden from views::View:
+ virtual void ChildPreferredSizeChanged(View* child) OVERRIDE;
private:
const FocusCycler* focus_cycler_for_testing_;
+ ShelfAlignment alignment_;
DISALLOW_COPY_AND_ASSIGN(StatusAreaWidgetDelegate);
};
« no previous file with comments | « ash/system/status_area_widget.cc ('k') | ash/system/status_area_widget_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698