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

Side by Side Diff: mash/example/views_examples/views_examples.cc

Issue 2850743004: Replace ServiceInfo with BindSourceInfo. (Closed)
Patch Set: . 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
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #include <memory> 5 #include <memory>
6 #include <vector> 6 #include <vector>
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "mash/public/interfaces/launchable.mojom.h" 10 #include "mash/public/interfaces/launchable.mojom.h"
(...skipping 22 matching lines...) Expand all
33 33
34 private: 34 private:
35 // service_manager::Service: 35 // service_manager::Service:
36 void OnStart() override { 36 void OnStart() override {
37 tracing_.Initialize(context()->connector(), context()->identity().name()); 37 tracing_.Initialize(context()->connector(), context()->identity().name());
38 aura_init_ = base::MakeUnique<views::AuraInit>( 38 aura_init_ = base::MakeUnique<views::AuraInit>(
39 context()->connector(), context()->identity(), 39 context()->connector(), context()->identity(),
40 "views_mus_resources.pak", std::string(), nullptr, 40 "views_mus_resources.pak", std::string(), nullptr,
41 views::AuraInit::Mode::AURA_MUS); 41 views::AuraInit::Mode::AURA_MUS);
42 } 42 }
43 void OnBindInterface(const service_manager::ServiceInfo& source_info, 43 void OnBindInterface(const service_manager::BindSourceInfo& source_info,
44 const std::string& interface_name, 44 const std::string& interface_name,
45 mojo::ScopedMessagePipeHandle interface_pipe) override { 45 mojo::ScopedMessagePipeHandle interface_pipe) override {
46 registry_.BindInterface(source_info.identity, interface_name, 46 registry_.BindInterface(source_info.identity, interface_name,
47 std::move(interface_pipe)); 47 std::move(interface_pipe));
48 } 48 }
49 49
50 // mash::mojom::Launchable: 50 // mash::mojom::Launchable:
51 void Launch(uint32_t what, mash::mojom::LaunchMode how) override { 51 void Launch(uint32_t what, mash::mojom::LaunchMode how) override {
52 views::examples::ShowExamplesWindow(views::examples::QUIT_ON_CLOSE); 52 views::examples::ShowExamplesWindow(views::examples::QUIT_ON_CLOSE);
53 } 53 }
(...skipping 11 matching lines...) Expand all
65 tracing::Provider tracing_; 65 tracing::Provider tracing_;
66 std::unique_ptr<views::AuraInit> aura_init_; 66 std::unique_ptr<views::AuraInit> aura_init_;
67 67
68 DISALLOW_COPY_AND_ASSIGN(ViewsExamples); 68 DISALLOW_COPY_AND_ASSIGN(ViewsExamples);
69 }; 69 };
70 70
71 MojoResult ServiceMain(MojoHandle service_request_handle) { 71 MojoResult ServiceMain(MojoHandle service_request_handle) {
72 return service_manager::ServiceRunner(new ViewsExamples) 72 return service_manager::ServiceRunner(new ViewsExamples)
73 .Run(service_request_handle); 73 .Run(service_request_handle);
74 } 74 }
OLDNEW
« no previous file with comments | « mash/catalog_viewer/catalog_viewer.cc ('k') | mash/example/window_type_launcher/window_type_launcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698