forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcatalog_viewer.h
62 lines (47 loc) · 1.73 KB
/
catalog_viewer.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
// 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 MASH_CATALOG_VIEWER_CATALOG_VIEWER_H_
#define MASH_CATALOG_VIEWER_CATALOG_VIEWER_H_
#include <map>
#include <memory>
#include "base/callback.h"
#include "base/macros.h"
#include "mash/public/interfaces/launchable.mojom.h"
#include "mojo/public/cpp/bindings/binding_set.h"
#include "services/service_manager/public/cpp/interface_factory.h"
#include "services/service_manager/public/cpp/service.h"
#include "services/tracing/public/cpp/provider.h"
namespace views {
class AuraInit;
class Widget;
}
namespace mash {
namespace catalog_viewer {
class CatalogViewer
: public service_manager::Service,
public mojom::Launchable,
public service_manager::InterfaceFactory<mojom::Launchable> {
public:
CatalogViewer();
~CatalogViewer() override;
void RemoveWindow(views::Widget* window);
private:
// service_manager::Service:
void OnStart() override;
bool OnConnect(const service_manager::ServiceInfo& remote_info,
service_manager::InterfaceRegistry* registry) override;
// mojom::Launchable:
void Launch(uint32_t what, mojom::LaunchMode how) override;
// service_manager::InterfaceFactory<mojom::Launchable>:
void Create(const service_manager::Identity& remote_identity,
mojom::LaunchableRequest request) override;
mojo::BindingSet<mojom::Launchable> bindings_;
std::vector<views::Widget*> windows_;
tracing::Provider tracing_;
std::unique_ptr<views::AuraInit> aura_init_;
DISALLOW_COPY_AND_ASSIGN(CatalogViewer);
};
} // namespace catalog_viewer
} // namespace mash
#endif // MASH_CATALOG_VIEWER_CATALOG_VIEWER_H_