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

Side by Side Diff: mojo/public/cpp/application/lib/application_runner.cc

Issue 1926123002: Add a ctor for InterfaceRequest<I> that takes a ScopedMessagePipeHandle, and remove MakeRequest<I>(… (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "mojo/public/cpp/application/application_runner.h" 5 #include "mojo/public/cpp/application/application_runner.h"
6 6
7 #include "mojo/public/cpp/application/application_delegate.h" 7 #include "mojo/public/cpp/application/application_delegate.h"
8 #include "mojo/public/cpp/application/application_impl.h" 8 #include "mojo/public/cpp/application/application_impl.h"
9 #include "mojo/public/cpp/environment/environment.h" 9 #include "mojo/public/cpp/environment/environment.h"
10 #include "mojo/public/cpp/environment/logging.h" 10 #include "mojo/public/cpp/environment/logging.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 42
43 MojoResult ApplicationRunner::Run(MojoHandle app_request_handle) { 43 MojoResult ApplicationRunner::Run(MojoHandle app_request_handle) {
44 MOJO_DCHECK(!g_running) 44 MOJO_DCHECK(!g_running)
45 << "Another ApplicationRunner::Run() is already running!"; 45 << "Another ApplicationRunner::Run() is already running!";
46 46
47 g_running = true; 47 g_running = true;
48 Environment env; 48 Environment env;
49 { 49 {
50 RunLoop loop; 50 RunLoop loop;
51 ApplicationImpl app(delegate_.get(), 51 ApplicationImpl app(delegate_.get(),
52 MakeRequest<Application>(MakeScopedHandle( 52 InterfaceRequest<Application>(MakeScopedHandle(
53 MessagePipeHandle(app_request_handle)))); 53 MessagePipeHandle(app_request_handle))));
54 loop.Run(); 54 loop.Run();
55 } 55 }
56 56
57 delegate_.reset(); 57 delegate_.reset();
58 58
59 g_running = false; 59 g_running = false;
60 60
61 return MOJO_RESULT_OK; 61 return MOJO_RESULT_OK;
62 } 62 }
63 63
64 } // namespace mojo 64 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/application/application_runner_chromium.cc ('k') | mojo/public/cpp/application/lib/application_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698