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

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

Issue 861683003: Move services code brought in from Mojo to live under //third_party. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 10 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
(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_VIEW_MANAGER_PUBLIC_CPP_VIEW_MANAGER_DELEGATE_H_
6 #define MOJO_SERVICES_VIEW_MANAGER_PUBLIC_CPP_VIEW_MANAGER_DELEGATE_H_
7
8 #include "mojo/public/interfaces/application/service_provider.mojom.h"
9
10 namespace mojo {
11
12 class View;
13 class ViewManager;
14
15 // Interface implemented by an application using the view manager.
16 class ViewManagerDelegate {
17 public:
18 // Called when the application implementing this interface is embedded at
19 // |root|. Every embed results in a new ViewManager and root View being
20 // created. |root| and it's corresponding ViewManager are valid until
21 // OnViewManagerDisconnected() is called with the same object.
22 //
23 // |services| exposes the services offered by the embedder to the delegate.
24 //
25 // |exposed_services| is an object that the delegate can add services to
26 // expose to the embedder.
27 //
28 // Note that if a different application is subsequently embedded at |root|,
29 // the pipes connecting |services| and |exposed_services| to the embedder and
30 // any services obtained from them are not broken and will continue to be
31 // valid.
32 virtual void OnEmbed(View* root,
33 InterfaceRequest<ServiceProvider> services,
34 ServiceProviderPtr exposed_services) = 0;
35
36 // Called when a connection to the view manager service is closed.
37 // |view_manager| is not valid after this function returns.
38 virtual void OnViewManagerDisconnected(ViewManager* view_manager) = 0;
39
40 protected:
41 virtual ~ViewManagerDelegate() {}
42 };
43
44 } // namespace mojo
45
46 #endif // MOJO_SERVICES_VIEW_MANAGER_PUBLIC_CPP_VIEW_MANAGER_DELEGATE_H_
OLDNEW
« no previous file with comments | « mojo/services/view_manager/public/cpp/view_manager_context.h ('k') | mojo/services/view_manager/public/cpp/view_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698