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

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

Issue 665743003: Mojo JS Bindings: Simplify sharing services for content-provided JS applications (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Complete 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 | « no previous file | mojo/apps/js/application_delegate_impl.cc » ('j') | mojo/apps/js/js_app.h » ('J')
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_CONTENT_HANDLER_H_ 5 #ifndef MOJO_APPS_JS_CONTENT_HANDLER_H_
6 #define MOJO_APPS_JS_CONTENT_HANDLER_H_ 6 #define MOJO_APPS_JS_CONTENT_HANDLER_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/memory/scoped_vector.h" 9 #include "base/memory/scoped_vector.h"
10 #include "mojo/public/cpp/application/application_delegate.h" 10 #include "mojo/public/cpp/application/application_delegate.h"
(...skipping 19 matching lines...) Expand all
30 public: 30 public:
31 ApplicationDelegateImpl(); 31 ApplicationDelegateImpl();
32 ~ApplicationDelegateImpl() override; 32 ~ApplicationDelegateImpl() override;
33 33
34 // Add app to the AppVector and call its Start() method. 34 // Add app to the AppVector and call its Start() method.
35 void StartJSApp(scoped_ptr<JSApp> app); 35 void StartJSApp(scoped_ptr<JSApp> app);
36 36
37 // Remove app from the AppVector; destroys the app. 37 // Remove app from the AppVector; destroys the app.
38 void QuitJSApp(JSApp *app); 38 void QuitJSApp(JSApp *app);
39 39
40 void ConnectToService(ScopedMessagePipeHandle pipe_handle, 40 // Use the shell to connect to a ServiceProvider for application_url.
Aaron Boodman 2014/10/24 22:17:18 Why is the first param a bare pipe rather than a S
hansmuller 2014/10/27 22:43:22 JSApp::ConnectToApplication() calls this method wi
Aaron Boodman 2014/10/29 17:12:51 You turn it into an InterfaceRequest in the impl o
hansmuller 2014/10/29 22:43:40 Done.
41 const std::string& application_url, 41 void ConnectToApplication(ScopedMessagePipeHandle pipe_handle,
42 const std::string& interface_name); 42 const std::string& application_url);
Aaron Boodman 2014/10/24 22:17:18 Nit: it makes slightly more sense to me for applic
hansmuller 2014/10/27 22:43:22 I agree, reversing the order matches the ServicePr
43 43
44 protected: 44 protected:
45 // ApplicationDelegate: 45 // ApplicationDelegate:
46 void Initialize(ApplicationImpl* app) override; 46 void Initialize(ApplicationImpl* app) override;
47 47
48 private: 48 private:
49 typedef ScopedVector<JSApp> AppVector; 49 typedef ScopedVector<JSApp> AppVector;
50 ApplicationImpl* application_impl_; 50 ApplicationImpl* application_impl_; // Owns the shell used by all JSApps.
51 AppVector app_vector_; 51 AppVector app_vector_;
52 }; 52 };
53 53
54 } // namespace apps 54 } // namespace apps
55 } // namespace mojo 55 } // namespace mojo
56 56
57 #endif // MOJO_APPS_JS_CONTENT_HANDLER_H_ 57 #endif // MOJO_APPS_JS_CONTENT_HANDLER_H_
OLDNEW
« no previous file with comments | « no previous file | mojo/apps/js/application_delegate_impl.cc » ('j') | mojo/apps/js/js_app.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698