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