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

Unified Diff: ash/wm/aura/wm_shelf_aura.h

Issue 1914093002: Refactors DockedWindowLayoutManager in terms of ash/wm/common (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@nuke_aura_window
Patch Set: comment Created 4 years, 8 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/wm/aura/wm_root_window_controller_aura.cc ('k') | ash/wm/aura/wm_shelf_aura.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/aura/wm_shelf_aura.h
diff --git a/ash/wm/aura/wm_shelf_aura.h b/ash/wm/aura/wm_shelf_aura.h
new file mode 100644
index 0000000000000000000000000000000000000000..d73d190fce9fbf8c6c634c773aaf4bc42ec39fe4
--- /dev/null
+++ b/ash/wm/aura/wm_shelf_aura.h
@@ -0,0 +1,54 @@
+// Copyright 2016 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_WM_AURA_WM_SHELF_AURA_H_
+#define ASH_WM_AURA_WM_SHELF_AURA_H_
+
+#include "ash/ash_export.h"
+#include "ash/shelf/shelf_layout_manager_observer.h"
+#include "ash/wm/common/shelf/wm_shelf.h"
+#include "base/macros.h"
+#include "base/observer_list.h"
+
+namespace ash {
+
+class Shelf;
+class ShelfLayoutManager;
+
+namespace wm {
+
+// Aura implementation of WmShelf.
+class ASH_EXPORT WmShelfAura : public WmShelf,
+ public ShelfLayoutManagerObserver {
+ public:
+ explicit WmShelfAura(Shelf* shelf);
+ ~WmShelfAura() override;
+
+ private:
+ // WmShelf:
+ WmWindow* GetWindow() override;
+ ShelfAlignment GetAlignment() override;
+ ShelfBackgroundType GetBackgroundType() override;
+ void UpdateVisibilityState() override;
+ void AddObserver(WmShelfObserver* observer) override;
+ void RemoveObserver(WmShelfObserver* observer) override;
+
+ // ShelfLayoutManagerObserver:
+ void WillDeleteShelf() override;
+ void OnBackgroundUpdated(wm::ShelfBackgroundType background_type,
+ BackgroundAnimatorChangeType change_type) override;
+
+ Shelf* shelf_;
+ base::ObserverList<WmShelfObserver> observers_;
+ // ShelfLayoutManager is cached separately as it may be destroyed before
+ // WmShelfAura.
+ ShelfLayoutManager* shelf_layout_manager_;
+
+ DISALLOW_COPY_AND_ASSIGN(WmShelfAura);
+};
+
+} // namespace wm
+} // namespace ash
+
+#endif // ASH_WM_AURA_WM_SHELF_AURA_H_
« no previous file with comments | « ash/wm/aura/wm_root_window_controller_aura.cc ('k') | ash/wm/aura/wm_shelf_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698