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

Side by Side Diff: mojo/apps/js/js_app.h

Issue 627093002: mojo_js_standalone will quit after the last JSApp quits (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Attempt to fix the inexplicable fail-to-commit with a resync Created 6 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
« no previous file with comments | « mojo/apps/js/application_delegate_impl.cc ('k') | mojo/shell/desktop/mojo_main.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef MOJO_APPS_JS_JS_APP_H_ 5 #ifndef MOJO_APPS_JS_JS_APP_H_
6 #define MOJO_APPS_JS_JS_APP_H_ 6 #define MOJO_APPS_JS_JS_APP_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/threading/thread.h" 9 #include "base/threading/thread.h"
10 #include "gin/public/isolate_holder.h" 10 #include "gin/public/isolate_holder.h"
(...skipping 12 matching lines...) Expand all
23 23
24 class JSApp { 24 class JSApp {
25 public: 25 public:
26 JSApp(ApplicationDelegateImpl* app_delegate_impl); 26 JSApp(ApplicationDelegateImpl* app_delegate_impl);
27 virtual ~JSApp(); 27 virtual ~JSApp();
28 28
29 // Launch this app on a new thread. This method can be called on any thread. 29 // Launch this app on a new thread. This method can be called on any thread.
30 // This method causes Load() and then Run() to run on a new thread. 30 // This method causes Load() and then Run() to run on a new thread.
31 bool Start(); 31 bool Start();
32 32
33
34 // Subclasses must return the JS source code for this app's main script and 33 // Subclasses must return the JS source code for this app's main script and
35 // the filename or URL that identifies the script's origin. This method will 34 // the filename or URL that identifies the script's origin. This method will
36 // be called from this app's thread. 35 // be called from this app's thread.
37 virtual bool Load(std::string* source, std::string* file_name) = 0; 36 virtual bool Load(std::string* source, std::string* file_name) = 0;
38 37
39 // Called by the JS mojo module to quit this JS app. See mojo_module.cc. 38 // Called by the JS mojo module to quit this JS app. See mojo_module.cc.
40 void Quit(); 39 void Quit();
41 40
42 // Called by the JS mojo module to connect to a Mojo service. 41 // Called by the JS mojo module to connect to a Mojo service.
43 Handle ConnectToService(const std::string& application_url, 42 Handle ConnectToService(const std::string& application_url,
(...skipping 15 matching lines...) Expand all
59 scoped_ptr<gin::IsolateHolder> isolate_holder_; 58 scoped_ptr<gin::IsolateHolder> isolate_holder_;
60 scoped_ptr<gin::ShellRunner> shell_runner_; 59 scoped_ptr<gin::ShellRunner> shell_runner_;
61 60
62 DISALLOW_COPY_AND_ASSIGN(JSApp); 61 DISALLOW_COPY_AND_ASSIGN(JSApp);
63 }; 62 };
64 63
65 } // namespace apps 64 } // namespace apps
66 } // namespace mojo 65 } // namespace mojo
67 66
68 #endif // MOJO_APPS_JS_JS_APP_H_ 67 #endif // MOJO_APPS_JS_JS_APP_H_
OLDNEW
« no previous file with comments | « mojo/apps/js/application_delegate_impl.cc ('k') | mojo/shell/desktop/mojo_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698