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

Side by Side Diff: shell/context.h

Issue 1061413002: Shell: Make a separate binary for child processes. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Don't look at kChildProcess in desktop/main.cc. Created 5 years, 8 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 2013 The Chromium Authors. All rights reserved. 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 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 #ifndef SHELL_CONTEXT_H_ 5 #ifndef SHELL_CONTEXT_H_
6 #define SHELL_CONTEXT_H_ 6 #define SHELL_CONTEXT_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 // Resolve an URL relative to the CWD mojo_shell was invoked from. This is a 44 // Resolve an URL relative to the CWD mojo_shell was invoked from. This is a
45 // nop for everything but relative file URLs or URLs without a scheme. 45 // nop for everything but relative file URLs or URLs without a scheme.
46 GURL ResolveCommandLineURL(const std::string& path); 46 GURL ResolveCommandLineURL(const std::string& path);
47 47
48 // This must be called with a message loop set up for the current thread, 48 // This must be called with a message loop set up for the current thread,
49 // which must remain alive until after Shutdown() is called. Returns true on 49 // which must remain alive until after Shutdown() is called. Returns true on
50 // success. 50 // success.
51 bool Init(); 51 bool Init();
52 52
53 // Like Init(), but specifies values for |mojo_shell_path()| and
54 // |mojo_shell_child_path()| explicitly.
55 bool InitWithPaths(const base::FilePath& shell_path,
56 const base::FilePath& shell_child_path);
57
53 // If Init() was called and succeeded, this must be called before destruction. 58 // If Init() was called and succeeded, this must be called before destruction.
54 void Shutdown(); 59 void Shutdown();
55 60
56 void Run(const GURL& url); 61 void Run(const GURL& url);
57 62
58 ApplicationManager* application_manager() { return &application_manager_; } 63 ApplicationManager* application_manager() { return &application_manager_; }
59 URLResolver* url_resolver() { return &url_resolver_; } 64 URLResolver* url_resolver() { return &url_resolver_; }
60 65
61 // Available after Init(): 66 // Available after Init():
62 // These are absolute paths. |mojo_shell_path()| is really the path of the 67 // These are absolute paths. |mojo_shell_path()| is really the path of the
(...skipping 27 matching lines...) Expand all
90 GURL shell_file_root_; 95 GURL shell_file_root_;
91 GURL command_line_cwd_; 96 GURL command_line_cwd_;
92 97
93 DISALLOW_COPY_AND_ASSIGN(Context); 98 DISALLOW_COPY_AND_ASSIGN(Context);
94 }; 99 };
95 100
96 } // namespace shell 101 } // namespace shell
97 } // namespace mojo 102 } // namespace mojo
98 103
99 #endif // SHELL_CONTEXT_H_ 104 #endif // SHELL_CONTEXT_H_
OLDNEW
« shell/android/main.cc ('K') | « shell/child_process_host.cc ('k') | shell/context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698