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

Side by Side Diff: components/view_manager/public/cpp/view_manager_init.h

Issue 1254383016: ApplicationConnection lifetime management changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 4 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 COMPONENTS_VIEW_MANAGER_PUBLIC_CPP_VIEW_MANAGER_INIT_H_ 5 #ifndef COMPONENTS_VIEW_MANAGER_PUBLIC_CPP_VIEW_MANAGER_INIT_H_
6 #define COMPONENTS_VIEW_MANAGER_PUBLIC_CPP_VIEW_MANAGER_INIT_H_ 6 #define COMPONENTS_VIEW_MANAGER_PUBLIC_CPP_VIEW_MANAGER_INIT_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "components/view_manager/public/interfaces/view_manager.mojom.h" 10 #include "components/view_manager/public/interfaces/view_manager.mojom.h"
(...skipping 15 matching lines...) Expand all
26 ViewManagerInit(ApplicationImpl* app, 26 ViewManagerInit(ApplicationImpl* app,
27 ViewManagerDelegate* delegate, 27 ViewManagerDelegate* delegate,
28 ViewManagerRootClient* root_client); 28 ViewManagerRootClient* root_client);
29 ~ViewManagerInit(); 29 ~ViewManagerInit();
30 30
31 // Returns the ViewManagerRoot. This is only valid if |root_client| was 31 // Returns the ViewManagerRoot. This is only valid if |root_client| was
32 // supplied to the constructor. 32 // supplied to the constructor.
33 ViewManagerRoot* view_manager_root() { return view_manager_root_.get(); } 33 ViewManagerRoot* view_manager_root() { return view_manager_root_.get(); }
34 34
35 // Returns the application connection established with the view manager. 35 // Returns the application connection established with the view manager.
36 ApplicationConnection* connection() { return connection_; } 36 ApplicationConnection* connection() { return connection_.get(); }
37 37
38 private: 38 private:
39 class ClientFactory; 39 class ClientFactory;
40 40
41 void OnCreate(InterfaceRequest<ViewManagerClient> request); 41 void OnCreate(InterfaceRequest<ViewManagerClient> request);
42 42
43 ApplicationImpl* app_; 43 ApplicationImpl* app_;
44 ApplicationConnection* connection_; 44 scoped_ptr<ApplicationConnection> connection_;
45 ViewManagerDelegate* delegate_; 45 ViewManagerDelegate* delegate_;
46 scoped_ptr<ClientFactory> client_factory_; 46 scoped_ptr<ClientFactory> client_factory_;
47 ViewManagerRootPtr view_manager_root_; 47 ViewManagerRootPtr view_manager_root_;
48 scoped_ptr<Binding<ViewManagerRootClient>> root_client_binding_; 48 scoped_ptr<Binding<ViewManagerRootClient>> root_client_binding_;
49 49
50 DISALLOW_COPY_AND_ASSIGN(ViewManagerInit); 50 DISALLOW_COPY_AND_ASSIGN(ViewManagerInit);
51 }; 51 };
52 52
53 } // namespace mojo 53 } // namespace mojo
54 54
55 #endif // COMPONENTS_VIEW_MANAGER_PUBLIC_CPP_VIEW_MANAGER_INIT_H_ 55 #endif // COMPONENTS_VIEW_MANAGER_PUBLIC_CPP_VIEW_MANAGER_INIT_H_
OLDNEW
« no previous file with comments | « components/view_manager/public/cpp/lib/view_manager_init.cc ('k') | components/view_manager/view_manager_client_apptest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698