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

Unified Diff: ash/shelf/shelf_widget.h

Issue 2268823002: mash: Move more shelf files to ash/common/shelf. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix rebase. Created 4 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 | « ash/shelf/shelf_view_unittest.cc ('k') | ash/shelf/shelf_widget.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shelf/shelf_widget.h
diff --git a/ash/shelf/shelf_widget.h b/ash/shelf/shelf_widget.h
deleted file mode 100644
index bbf8f203691e341b05cf5c7063939016ee468a3b..0000000000000000000000000000000000000000
--- a/ash/shelf/shelf_widget.h
+++ /dev/null
@@ -1,138 +0,0 @@
-// 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 <memory>
-
-#include "ash/ash_export.h"
-#include "ash/common/shelf/shelf_background_animator.h"
-#include "ash/common/shelf/shelf_background_animator_observer.h"
-#include "ash/common/shelf/shelf_types.h"
-#include "ash/shelf/shelf_layout_manager_observer.h"
-#include "base/macros.h"
-#include "ui/views/widget/widget.h"
-#include "ui/views/widget/widget_observer.h"
-
-namespace ash {
-class FocusCycler;
-class Shelf;
-class ShelfLayoutManager;
-class ShelfView;
-class StatusAreaWidget;
-class WmShelf;
-class WmWindow;
-
-class ASH_EXPORT ShelfWidget : public views::Widget,
- public views::WidgetObserver,
- public ShelfBackgroundAnimatorObserver,
- public ShelfLayoutManagerObserver {
- public:
- ShelfWidget(WmWindow* shelf_container,
- WmWindow* status_container,
- WmShelf* wm_shelf);
- ~ShelfWidget() override;
-
- // Returns if shelf alignment option is enabled, and the user is able to
- // adjust the alignment (guest and supervised mode users cannot for example).
- static bool ShelfAlignmentAllowed();
-
- void OnShelfAlignmentChanged();
-
- // DEPRECATED: Prefer WmShelf::GetAlignment().
- ShelfAlignment GetAlignment() const;
-
- // Sets the shelf's background type.
- void SetPaintsBackground(ShelfBackgroundType background_type,
- BackgroundAnimatorChangeType change_type);
- ShelfBackgroundType GetBackgroundType() const;
-
- // Hide the shelf behind a black bar during e.g. a user transition when |hide|
- // is true. The |animation_time_ms| will be used as animation duration.
- void HideShelfBehindBlackBar(bool hide, int animation_time_ms);
- bool IsShelfHiddenBehindBlackBar() const;
-
- // Causes shelf items to be slightly dimmed (e.g. when a window is maximized).
- void SetDimsShelf(bool dimming);
- bool GetDimsShelf() const;
-
- // TODO(jamescook): Eliminate these.
- Shelf* shelf() { return shelf_; }
- void set_shelf(Shelf* shelf) { shelf_ = shelf; }
-
- ShelfLayoutManager* shelf_layout_manager() { return shelf_layout_manager_; }
- StatusAreaWidget* status_area_widget() const { return status_area_widget_; }
-
- ShelfView* CreateShelfView();
- void PostCreateShelf();
-
- // Set visibility of the shelf.
- void SetShelfVisibility(bool visible);
- bool IsShelfVisible() const;
-
- bool IsShowingContextMenu() const;
-
- bool IsShowingOverflowBubble() const;
-
- // Sets the focus cycler. Also adds the shelf to the cycle.
- void SetFocusCycler(FocusCycler* focus_cycler);
- FocusCycler* GetFocusCycler();
-
- // Called by the activation delegate, before the shelf is activated
- // when no other windows are visible.
- void WillActivateAsFallback() { activating_as_fallback_ = true; }
-
- // Clean up prior to deletion.
- void Shutdown();
-
- // Force the shelf to be presented in an undimmed state.
- void ForceUndimming(bool force);
-
- // Overridden from views::WidgetObserver:
- void OnWidgetActivationChanged(views::Widget* widget, bool active) override;
-
- // A function to test the current alpha used by the dimming bar. If there is
- // no dimmer active, the function will return -1.
- int GetDimmingAlphaForTest();
-
- // A function to test the bounds of the dimming bar. Returns gfx::Rect() if
- // the dimmer is inactive.
- gfx::Rect GetDimmerBoundsForTest();
-
- // Disable dimming animations for running tests.
- void DisableDimmingAnimationsForTest();
-
- // ShelfBackgroundAnimatorObserver overrides:
- void UpdateShelfItemBackground(int alpha) override;
-
- // ShelfLayoutManagerObserver overrides:
- void WillDeleteShelfLayoutManager() override;
-
- private:
- class DelegateView;
- friend class DelegateView;
-
- WmShelf* wm_shelf_;
-
- // Owned by the shelf container's window.
- ShelfLayoutManager* shelf_layout_manager_;
- // Owned by the root window controller.
- Shelf* shelf_;
- StatusAreaWidget* status_area_widget_;
-
- // |delegate_view_| is the contents view of this widget and is cleaned up
- // during CloseChildWindows of the associated RootWindowController.
- DelegateView* delegate_view_;
- // View containing the shelf items. Owned by the views hierarchy.
- ShelfView* shelf_view_;
- ShelfBackgroundAnimator background_animator_;
- bool activating_as_fallback_;
-
- DISALLOW_COPY_AND_ASSIGN(ShelfWidget);
-};
-
-} // namespace ash
-
-#endif // ASH_SHELF_SHELF_WIDGET_H_
« no previous file with comments | « ash/shelf/shelf_view_unittest.cc ('k') | ash/shelf/shelf_widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698