OLD | NEW |
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 #include <stdint.h> | 5 #include <stdint.h> |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/at_exit.h" | 9 #include "base/at_exit.h" |
10 #include "base/base_paths.h" | 10 #include "base/base_paths.h" |
(...skipping 28 matching lines...) Expand all Loading... |
39 | 39 |
40 class TargetApplicationDelegate : public mojo::ShellClient, | 40 class TargetApplicationDelegate : public mojo::ShellClient, |
41 public mojo::InterfaceFactory<Driver>, | 41 public mojo::InterfaceFactory<Driver>, |
42 public Driver { | 42 public Driver { |
43 public: | 43 public: |
44 TargetApplicationDelegate() : weak_factory_(this) {} | 44 TargetApplicationDelegate() : weak_factory_(this) {} |
45 ~TargetApplicationDelegate() override {} | 45 ~TargetApplicationDelegate() override {} |
46 | 46 |
47 private: | 47 private: |
48 // mojo::ShellClient: | 48 // mojo::ShellClient: |
49 void Initialize(mojo::Connector* connector, const std::string& url, | 49 void Initialize(mojo::Connector* connector, const std::string& name, |
50 uint32_t id, uint32_t user_id) override { | 50 uint32_t id, uint32_t user_id) override { |
51 base::FilePath target_path; | 51 base::FilePath target_path; |
52 CHECK(base::PathService::Get(base::DIR_EXE, &target_path)); | 52 CHECK(base::PathService::Get(base::DIR_EXE, &target_path)); |
53 #if defined(OS_WIN) | 53 #if defined(OS_WIN) |
54 target_path = target_path.Append( | 54 target_path = target_path.Append( |
55 FILE_PATH_LITERAL("application_manager_apptest_target.exe")); | 55 FILE_PATH_LITERAL("application_manager_apptest_target.exe")); |
56 #else | 56 #else |
57 target_path = target_path.Append( | 57 target_path = target_path.Append( |
58 FILE_PATH_LITERAL("application_manager_apptest_target")); | 58 FILE_PATH_LITERAL("application_manager_apptest_target")); |
59 #endif | 59 #endif |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 | 143 |
144 int main(int argc, char** argv) { | 144 int main(int argc, char** argv) { |
145 base::AtExitManager at_exit; | 145 base::AtExitManager at_exit; |
146 base::CommandLine::Init(argc, argv); | 146 base::CommandLine::Init(argc, argv); |
147 | 147 |
148 mojo::shell::InitializeLogging(); | 148 mojo::shell::InitializeLogging(); |
149 | 149 |
150 TargetApplicationDelegate delegate; | 150 TargetApplicationDelegate delegate; |
151 return mojo::shell::TestNativeMain(&delegate); | 151 return mojo::shell::TestNativeMain(&delegate); |
152 } | 152 } |
OLD | NEW |