OLD | NEW |
---|---|
(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 { | |
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
| |
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_ | |
OLD | NEW |