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

Unified Diff: ash/mus/shelf_delegate_mus.h

Issue 2259153002: mash: Port ash_sysui ShelfDelegateMus impl to mojo:ash. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Destroy the window manager app before tearing down MD controllers. 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
Index: ash/mus/shelf_delegate_mus.h
diff --git a/ash/sysui/shelf_delegate_mus.h b/ash/mus/shelf_delegate_mus.h
similarity index 56%
rename from ash/sysui/shelf_delegate_mus.h
rename to ash/mus/shelf_delegate_mus.h
index 74b3948432b043422517394b3524f8c6a7733050..94453d446d2d535dca26db97175a12dce2b99362 100644
--- a/ash/sysui/shelf_delegate_mus.h
+++ b/ash/mus/shelf_delegate_mus.h
@@ -2,13 +2,15 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef ASH_SYSUI_SHELF_DELEGATE_MUS_H_
-#define ASH_SYSUI_SHELF_DELEGATE_MUS_H_
+#ifndef ASH_MUS_SHELF_DELEGATE_MUS_H_
+#define ASH_MUS_SHELF_DELEGATE_MUS_H_
#include <map>
+#include <string>
#include "ash/common/shelf/shelf_delegate.h"
-#include "mash/shelf/public/interfaces/shelf.mojom.h"
+#include "ash/common/shelf/shelf_types.h"
+#include "ash/public/interfaces/shelf.mojom.h"
#include "mojo/public/cpp/bindings/binding.h"
#include "mojo/public/cpp/bindings/interface_ptr_set.h"
@@ -16,12 +18,8 @@ namespace ash {
class ShelfModel;
-namespace sysui {
-
// Manages communication between the mash shelf and the browser.
-// TODO(mash): Support ShelfController in mojo:ash and remove this sysui impl.
-class ShelfDelegateMus : public ShelfDelegate,
- public mash::shelf::mojom::ShelfController {
+class ShelfDelegateMus : public ShelfDelegate, public mojom::ShelfController {
public:
explicit ShelfDelegateMus(ShelfModel* model);
~ShelfDelegateMus() override;
@@ -41,24 +39,19 @@ class ShelfDelegateMus : public ShelfDelegate,
bool IsAppPinned(const std::string& app_id) override;
void UnpinAppWithID(const std::string& app_id) override;
- // mash::shelf::mojom::ShelfController:
- void AddObserver(
- mash::shelf::mojom::ShelfObserverAssociatedPtrInfo observer) override;
- void SetAlignment(mash::shelf::mojom::Alignment alignment) override;
- void SetAutoHideBehavior(
- mash::shelf::mojom::AutoHideBehavior auto_hide) override;
- void PinItem(
- mash::shelf::mojom::ShelfItemPtr item,
- mash::shelf::mojom::ShelfItemDelegateAssociatedPtrInfo delegate) override;
- void UnpinItem(const mojo::String& app_id) override;
- void SetItemImage(const mojo::String& app_id, const SkBitmap& image) override;
-
- // Set the Mus window preferred sizes.
- void SetShelfPreferredSizes(Shelf* shelf);
+ // mojom::ShelfController:
+ void AddObserver(mojom::ShelfObserverAssociatedPtrInfo observer) override;
+ void SetAlignment(ShelfAlignment alignment, int64_t display_id) override;
+ void SetAutoHideBehavior(ShelfAutoHideBehavior auto_hide,
+ int64_t display_id) override;
+ void PinItem(mojom::ShelfItemPtr item,
+ mojom::ShelfItemDelegateAssociatedPtrInfo delegate) override;
+ void UnpinItem(const std::string& app_id) override;
+ void SetItemImage(const std::string& app_id, const SkBitmap& image) override;
ShelfModel* model_;
- mojo::AssociatedInterfacePtrSet<mash::shelf::mojom::ShelfObserver> observers_;
+ mojo::AssociatedInterfacePtrSet<mojom::ShelfObserver> observers_;
std::map<uint32_t, ShelfID> window_id_to_shelf_id_;
@@ -68,7 +61,6 @@ class ShelfDelegateMus : public ShelfDelegate,
DISALLOW_COPY_AND_ASSIGN(ShelfDelegateMus);
};
-} // namespace sysui
} // namespace ash
-#endif // ASH_SYSUI_SHELF_DELEGATE_MUS_H_
+#endif // ASH_MUS_SHELF_DELEGATE_MUS_H_

Powered by Google App Engine
This is Rietveld 408576698