| 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 "base/at_exit.h" | 5 #include "base/at_exit.h" |
| 6 #include "base/base_paths.h" | 6 #include "base/base_paths.h" |
| 7 #include "base/base_switches.h" | 7 #include "base/base_switches.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 | 110 |
| 111 // Driver: | 111 // Driver: |
| 112 void QuitDriver() override { | 112 void QuitDriver() override { |
| 113 target_.Terminate(0, false); | 113 target_.Terminate(0, false); |
| 114 app_->Quit(); | 114 app_->Quit(); |
| 115 } | 115 } |
| 116 | 116 |
| 117 void DidCreateChannel(mojo::embedder::ChannelInfo* channel_info) {} | 117 void DidCreateChannel(mojo::embedder::ChannelInfo* channel_info) {} |
| 118 | 118 |
| 119 mojo::ApplicationImpl* app_; | 119 mojo::ApplicationImpl* app_; |
| 120 base::WeakPtrFactory<TargetApplicationDelegate> weak_factory_; | |
| 121 base::Process target_; | 120 base::Process target_; |
| 122 mojo::WeakBindingSet<Driver> bindings_; | 121 mojo::WeakBindingSet<Driver> bindings_; |
| 122 base::WeakPtrFactory<TargetApplicationDelegate> weak_factory_; |
| 123 | 123 |
| 124 DISALLOW_COPY_AND_ASSIGN(TargetApplicationDelegate); | 124 DISALLOW_COPY_AND_ASSIGN(TargetApplicationDelegate); |
| 125 }; | 125 }; |
| 126 | 126 |
| 127 } // namespace | 127 } // namespace |
| 128 | 128 |
| 129 int main(int argc, char** argv) { | 129 int main(int argc, char** argv) { |
| 130 base::AtExitManager at_exit; | 130 base::AtExitManager at_exit; |
| 131 base::CommandLine::Init(argc, argv); | 131 base::CommandLine::Init(argc, argv); |
| 132 | 132 |
| 133 mojo::runner::InitializeLogging(); | 133 mojo::runner::InitializeLogging(); |
| 134 | 134 |
| 135 TargetApplicationDelegate delegate; | 135 TargetApplicationDelegate delegate; |
| 136 return mojo::runner::TestNativeMain(&delegate); | 136 return mojo::runner::TestNativeMain(&delegate); |
| 137 } | 137 } |
| OLD | NEW |