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

Side by Side Diff: ash/public/cpp/remote_shelf_item_delegate.h

Issue 2833173002: mash: Support ShelfModel access in Chrome. (Closed)
Patch Set: Cleanup; Fix an Arc test by use CLC, not Ash's ShelfModel. 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef ASH_PUBLIC_CPP_REMOTE_SHELF_ITEM_DELEGATE_H_
6 #define ASH_PUBLIC_CPP_REMOTE_SHELF_ITEM_DELEGATE_H_
7
8 #include "ash/public/cpp/shelf_item_delegate.h"
9
10 namespace ash {
11
12 // A ShelfItemDelegate that forwards calls to a remote ShelfItemDelegatePtr.
13 // Used by Ash and Chrome ShelfModels for delegation across service boundaries.
14 class ASH_PUBLIC_EXPORT RemoteShelfItemDelegate : public ShelfItemDelegate {
15 public:
16 RemoteShelfItemDelegate(const ShelfID& shelf_id,
17 mojom::ShelfItemDelegatePtr delegate);
18 ~RemoteShelfItemDelegate() override;
19
20 // mojom::ShelfItemDelegate
21 void ItemSelected(std::unique_ptr<ui::Event> event,
22 int64_t display_id,
23 ShelfLaunchSource source,
24 ItemSelectedCallback callback) override;
25 void ExecuteCommand(uint32_t command_id, int32_t event_flags) override;
26 void Close() override;
27
28 private:
29 // The pointer to the remote delegate.
30 mojom::ShelfItemDelegatePtr delegate_;
31
32 DISALLOW_COPY_AND_ASSIGN(RemoteShelfItemDelegate);
33 };
34
35 } // namespace ash
36
37 #endif // ASH_PUBLIC_CPP_REMOTE_SHELF_ITEM_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698