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

Unified Diff: ash/public/cpp/remote_shelf_item_delegate.h

Issue 2833173002: mash: Support ShelfModel access in Chrome. (Closed)
Patch Set: Address comments; fix test failures. Created 3 years, 7 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/public/cpp/BUILD.gn ('k') | ash/public/cpp/remote_shelf_item_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/public/cpp/remote_shelf_item_delegate.h
diff --git a/ash/public/cpp/remote_shelf_item_delegate.h b/ash/public/cpp/remote_shelf_item_delegate.h
new file mode 100644
index 0000000000000000000000000000000000000000..f9a9b8f687f64553ede124505a3ed8bafb814696
--- /dev/null
+++ b/ash/public/cpp/remote_shelf_item_delegate.h
@@ -0,0 +1,37 @@
+// Copyright 2017 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_PUBLIC_CPP_REMOTE_SHELF_ITEM_DELEGATE_H_
+#define ASH_PUBLIC_CPP_REMOTE_SHELF_ITEM_DELEGATE_H_
+
+#include "ash/public/cpp/shelf_item_delegate.h"
+
+namespace ash {
+
+// A ShelfItemDelegate that forwards calls to a remote ShelfItemDelegatePtr.
+// Used by Ash and Chrome ShelfModels for delegation across service boundaries.
+class ASH_PUBLIC_EXPORT RemoteShelfItemDelegate : public ShelfItemDelegate {
Tom Sepez 2017/05/31 21:14:27 This is WM -> browser or other trusted components,
msw 2017/05/31 21:36:54 Yes, this is WM <-> browser only for now. Ash cons
+ public:
+ RemoteShelfItemDelegate(const ShelfID& shelf_id,
+ mojom::ShelfItemDelegatePtr delegate);
+ ~RemoteShelfItemDelegate() override;
+
+ // mojom::ShelfItemDelegate
+ void ItemSelected(std::unique_ptr<ui::Event> event,
+ int64_t display_id,
+ ShelfLaunchSource source,
+ ItemSelectedCallback callback) override;
+ void ExecuteCommand(uint32_t command_id, int32_t event_flags) override;
+ void Close() override;
+
+ private:
+ // The pointer to the remote delegate.
+ mojom::ShelfItemDelegatePtr delegate_;
+
+ DISALLOW_COPY_AND_ASSIGN(RemoteShelfItemDelegate);
+};
+
+} // namespace ash
+
+#endif // ASH_PUBLIC_CPP_REMOTE_SHELF_ITEM_DELEGATE_H_
« no previous file with comments | « ash/public/cpp/BUILD.gn ('k') | ash/public/cpp/remote_shelf_item_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698