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

Side by Side Diff: mojo/shell/tests/application_manager/target.cc

Issue 1764253002: Rename shell.mojom to connector.mojom, ApplicationManager to Shell (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@32exe
Patch Set: . Created 4 years, 9 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 2015 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 #include "base/at_exit.h"
6 #include "base/command_line.h"
7 #include "base/macros.h"
8 #include "mojo/shell/public/cpp/connection.h"
9 #include "mojo/shell/public/cpp/connector.h"
10 #include "mojo/shell/public/cpp/shell_client.h"
11 #include "mojo/shell/runner/child/test_native_main.h"
12 #include "mojo/shell/runner/init.h"
13 #include "mojo/shell/tests/application_manager/application_manager_unittest.mojo m.h"
14
15 using mojo::shell::test::mojom::CreateInstanceForHandleTestPtr;
16
17 namespace {
18
19 class Target : public mojo::ShellClient {
20 public:
21 Target() {}
22 ~Target() override {}
23
24 private:
25 // mojo::ShellClient:
26 void Initialize(mojo::Connector* connector, const std::string& name,
27 uint32_t id, uint32_t user_id) override {
28 CreateInstanceForHandleTestPtr service;
29 connector->ConnectToInterface("mojo:application_manager_unittest",
30 &service);
31 service->SetTargetID(id);
32 }
33
34 DISALLOW_COPY_AND_ASSIGN(Target);
35 };
36
37 } // namespace
38
39 int main(int argc, char** argv) {
40 base::AtExitManager at_exit;
41 base::CommandLine::Init(argc, argv);
42
43 mojo::shell::InitializeLogging();
44
45 Target target;
46 return mojo::shell::TestNativeMain(&target);
47 }
OLDNEW
« no previous file with comments | « mojo/shell/tests/application_manager/driver_manifest.json ('k') | mojo/shell/tests/connect/connect_test_app.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698