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

Side by Side Diff: mojo/shell/shell.cc

Issue 25895002: Simple shell that loads a dll and calls an entrypoint function passing in a handle to a pipe create… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: exports to template instantiations Created 7 years, 2 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 2013 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/files/file_path.h"
8 #include "base/logging.h"
9 #include "base/message_loop/message_loop.h"
10 #include "mojo/shell/app_container.h"
11 #include "mojo/shell/switches.h"
12 #include "mojo/system/core_impl.h"
13
14 int main(int argc, char** argv) {
15 base::AtExitManager at_exit;
16 CommandLine::Init(argc, argv);
17
18 mojo::system::CoreImpl::Init();
19
20 base::MessageLoop message_loop(base::MessageLoop::TYPE_UI);
21
22 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
23 if (!command_line.HasSwitch(switches::kApp)) {
24 LOG(ERROR) << "No app path specified.";
25 return 0;
26 }
27
28 scoped_ptr<mojo::shell::AppContainer> container(
29 new mojo::shell::AppContainer);
30 container->LaunchApp(command_line.GetSwitchValuePath(switches::kApp));
31 message_loop.Run();
32 return 0;
33 }
OLDNEW
« build/all.gyp ('K') | « mojo/shell/sample_app.cc ('k') | mojo/shell/switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698