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

Side by Side Diff: mojo/services/public/cpp/view_manager/view_manager_context.h

Issue 591633002: Replace most uses of ViewManagerInitService with client lib ViewManager::Embed() to offer the same … (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 6 years, 3 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/services/public/cpp/view_manager/view_manager.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_VIEW_MANAGER_CONTEXT_H_
6 #define MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_VIEW_MANAGER_CONTEXT_H_
7
8 #include <string>
9 #include <vector>
10
11 #include "base/bind.h"
12 #include "base/memory/scoped_ptr.h"
13 #include "mojo/public/cpp/application/service_provider_impl.h"
14
15 namespace mojo {
16 class ApplicationImpl;
17
18 class ViewManagerContext {
19 public:
20 explicit ViewManagerContext(ApplicationImpl* application_impl);
21 ~ViewManagerContext();
22
23 // Embed an application @ |url| at an appropriate View.
24 // The first time this method is called in the life time of the View Manager
25 // service the "appropriate View" is defined as being the service' root View.
26 // Subsequent times, the implementation of this method is delegated to the
27 // application embedded at the service root View. This application will have a
28 // specific definition of where within its View hierarchy to embed an
29 // un-parented URL. |exported_services| encapsulates services offered by the
30 // application calling Embed() to the application being embedded. Returns
31 // an object implementing ServiceProvider encapsulating services offered by
32 // the embedded application to the embedder.
33 void Embed(const String& url);
34 scoped_ptr<ServiceProvider> Embed(
35 const String& url,
36 scoped_ptr<ServiceProviderImpl> exported_services);
37
38 private:
39 class InternalState;
40 scoped_ptr<InternalState> state_;
41
42 MOJO_DISALLOW_COPY_AND_ASSIGN(ViewManagerContext);
43 };
44
45 } // namespace mojo
46
47 #endif // MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_VIEW_MANAGER_CONTEXT_H_
OLDNEW
« no previous file with comments | « mojo/services/public/cpp/view_manager/view_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698