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

Side by Side Diff: mash/example/window_type_launcher/window_type_launcher.h

Issue 2420253002: Rename shell namespace to service_manager (Closed)
Patch Set: . Created 4 years, 2 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
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MASH_EXAMPLE_WINDOW_TYPE_LAUNCHER_WINDOW_TYPE_LAUNCHER_H_ 5 #ifndef MASH_EXAMPLE_WINDOW_TYPE_LAUNCHER_WINDOW_TYPE_LAUNCHER_H_
6 #define MASH_EXAMPLE_WINDOW_TYPE_LAUNCHER_WINDOW_TYPE_LAUNCHER_H_ 6 #define MASH_EXAMPLE_WINDOW_TYPE_LAUNCHER_WINDOW_TYPE_LAUNCHER_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "mash/public/interfaces/launchable.mojom.h" 11 #include "mash/public/interfaces/launchable.mojom.h"
12 #include "mojo/public/cpp/bindings/binding_set.h" 12 #include "mojo/public/cpp/bindings/binding_set.h"
13 #include "services/service_manager/public/cpp/service.h" 13 #include "services/service_manager/public/cpp/service.h"
14 14
15 namespace views { 15 namespace views {
16 class AuraInit; 16 class AuraInit;
17 class Widget; 17 class Widget;
18 class WindowManagerConnection; 18 class WindowManagerConnection;
19 } 19 }
20 20
21 class WindowTypeLauncher 21 class WindowTypeLauncher
22 : public shell::Service, 22 : public service_manager::Service,
23 public mash::mojom::Launchable, 23 public mash::mojom::Launchable,
24 public shell::InterfaceFactory<mash::mojom::Launchable> { 24 public service_manager::InterfaceFactory<mash::mojom::Launchable> {
25 public: 25 public:
26 WindowTypeLauncher(); 26 WindowTypeLauncher();
27 ~WindowTypeLauncher() override; 27 ~WindowTypeLauncher() override;
28 28
29 void RemoveWindow(views::Widget* window); 29 void RemoveWindow(views::Widget* window);
30 30
31 private: 31 private:
32 // shell::Service: 32 // service_manager::Service:
33 void OnStart(const shell::Identity& identity) override; 33 void OnStart(const service_manager::Identity& identity) override;
34 bool OnConnect(const shell::Identity& remote_identity, 34 bool OnConnect(const service_manager::Identity& remote_identity,
35 shell::InterfaceRegistry* registry) override; 35 service_manager::InterfaceRegistry* registry) override;
36 36
37 // mash::mojom::Launchable: 37 // mash::mojom::Launchable:
38 void Launch(uint32_t what, mash::mojom::LaunchMode how) override; 38 void Launch(uint32_t what, mash::mojom::LaunchMode how) override;
39 39
40 // shell::InterfaceFactory<mash::mojom::Launchable>: 40 // service_manager::InterfaceFactory<mash::mojom::Launchable>:
41 void Create(const shell::Identity& remote_identity, 41 void Create(const service_manager::Identity& remote_identity,
42 mash::mojom::LaunchableRequest request) override; 42 mash::mojom::LaunchableRequest request) override;
43 43
44 mojo::BindingSet<mash::mojom::Launchable> bindings_; 44 mojo::BindingSet<mash::mojom::Launchable> bindings_;
45 std::vector<views::Widget*> windows_; 45 std::vector<views::Widget*> windows_;
46 46
47 std::unique_ptr<views::AuraInit> aura_init_; 47 std::unique_ptr<views::AuraInit> aura_init_;
48 std::unique_ptr<views::WindowManagerConnection> window_manager_connection_; 48 std::unique_ptr<views::WindowManagerConnection> window_manager_connection_;
49 49
50 DISALLOW_COPY_AND_ASSIGN(WindowTypeLauncher); 50 DISALLOW_COPY_AND_ASSIGN(WindowTypeLauncher);
51 }; 51 };
52 52
53 #endif // MASH_EXAMPLE_WINDOW_TYPE_LAUNCHER_WINDOW_TYPE_LAUNCHER_H_ 53 #endif // MASH_EXAMPLE_WINDOW_TYPE_LAUNCHER_WINDOW_TYPE_LAUNCHER_H_
OLDNEW
« no previous file with comments | « mash/example/views_examples/views_examples.cc ('k') | mash/example/window_type_launcher/window_type_launcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698