Index: ash/shelf/shelf_widget.h |
diff --git a/ash/shelf/shelf_widget.h b/ash/shelf/shelf_widget.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..322c53ee5a12f5a07df03889b474d0eeb0cf3780 |
--- /dev/null |
+++ b/ash/shelf/shelf_widget.h |
@@ -0,0 +1,96 @@ |
+// Copyright (c) 2012 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 ASH_SHELF_SHELF_WIDGET_H_ |
+#define ASH_SHELF_SHELF_WIDGET_H_ |
+ |
+#include "ash/ash_export.h" |
+#include "ash/shelf/background_animator.h" |
+#include "ash/shelf/shelf_types.h" |
+#include "ui/views/widget/widget.h" |
+#include "ui/views/widget/widget_observer.h" |
+ |
+namespace aura { |
+class Window; |
+} |
+ |
+namespace ash { |
+class Launcher; |
+ |
+namespace internal { |
+class FocusCycler; |
+class StatusAreaWidget; |
+class ShelfLayoutManager; |
+class WorkspaceController; |
+} |
+ |
+class ASH_EXPORT ShelfWidget : public views::Widget, |
+ public views::WidgetObserver { |
+ public: |
+ ShelfWidget( |
+ aura::Window* shelf_container, |
+ aura::Window* status_container, |
+ internal::WorkspaceController* workspace_controller); |
+ virtual ~ShelfWidget(); |
+ |
+ ShelfAlignment GetAlignment() const; |
+ void SetAlignment(ShelfAlignment alignmnet); |
+ |
+ // Sets/gets the shelf auto-hide behavior. |
+ ShelfAutoHideBehavior GetAutoHideBehavior() const; |
+ void SetAutoHideBehavior(ShelfAutoHideBehavior behavior); |
+ |
+ // Sets whether the launcher paints a background. Default is false, but is set |
+ // to true if a window overlaps the shelf. |
+ void SetPaintsBackground( |
+ bool value, |
+ internal::BackgroundAnimator::ChangeType change_type); |
+ bool paints_background() const { |
+ return background_animator_.paints_background(); |
+ } |
+ |
+ // Causes shelf items to be slightly dimmed. |
+ void SetDimsShelf(bool dimming); |
+ bool GetDimsShelf() const; |
+ |
+ internal::ShelfLayoutManager* shelf_layout_manager() { |
+ return shelf_layout_manager_; |
+ } |
+ Launcher* launcher() const { return launcher_.get(); } |
+ internal::StatusAreaWidget* status_area_widget() const { |
+ return status_area_widget_; |
+ } |
+ |
+ void CreateLauncher(); |
Mr4D (OOO till 08-26)
2013/03/02 02:02:12
Here are only a few comments. Maybe add a few?
Harry McCleave
2013/03/04 02:47:41
Done.
|
+ bool LauncherVisible() const; |
+ void SetLauncherVisibility(bool visible); |
+ |
+ // Sets the focus cycler. Also adds the launcher to the cycle. |
+ void SetFocusCycler(internal::FocusCycler* focus_cycler); |
+ internal::FocusCycler* GetFocusCycler(); |
+ |
+ // Called by the activation delegate, before the launcher is activated |
+ // when no other windows are visible. |
+ void WillActivateAsFallback() { activating_as_fallback_ = true; } |
+ |
+ // Overridden from views::WidgetObserver: |
+ virtual void OnWidgetActivationChanged( |
+ views::Widget* widget, bool active) OVERRIDE; |
+ |
+ aura::Window* window_container() { return window_container_; } |
Mr4D (OOO till 08-26)
2013/03/02 02:02:12
empty line before private
Harry McCleave
2013/03/04 02:47:41
Done.
Harry McCleave
2013/03/04 02:47:41
Done.
|
+ private: |
+ class DelegateView; |
+ |
+ internal::ShelfLayoutManager* shelf_layout_manager_; |
+ scoped_ptr<Launcher> launcher_; |
+ internal::StatusAreaWidget* status_area_widget_; |
+ DelegateView* delegate_view_; |
+ internal::BackgroundAnimator background_animator_; |
+ bool activating_as_fallback_; |
+ aura::Window* window_container_; |
+}; |
+ |
+} // namespace ash |
+ |
+#endif // ASH_SHELF_SHELF_WIDGET_H_ |