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

Side by Side Diff: services/ui/view_manager/view_stub.h

Issue 1682113003: Mojo C++ bindings: Generate InterfaceHandle<> instead of InterfacePtr<>. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: rebase ontop of master, address trung's comments Created 4 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
« no previous file with comments | « services/ui/view_manager/view_registry.cc ('k') | services/ui/view_manager/view_stub.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 SERVICES_UI_VIEW_MANAGER_VIEW_STUB_H_ 5 #ifndef SERVICES_UI_VIEW_MANAGER_VIEW_STUB_H_
6 #define SERVICES_UI_VIEW_MANAGER_VIEW_STUB_H_ 6 #define SERVICES_UI_VIEW_MANAGER_VIEW_STUB_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 16 matching lines...) Expand all
27 // 27 //
28 // Instances of this object are held by a unique pointer owned by the 28 // Instances of this object are held by a unique pointer owned by the
29 // parent view or view tree at the point where the view is being linked. 29 // parent view or view tree at the point where the view is being linked.
30 // Note that the lifetime of the views themselves is managed by the view 30 // Note that the lifetime of the views themselves is managed by the view
31 // registry. 31 // registry.
32 class ViewStub { 32 class ViewStub {
33 public: 33 public:
34 // Begins the process of resolving a view. 34 // Begins the process of resolving a view.
35 // Invokes |ViewRegistry.OnViewResolved| when the token is obtained 35 // Invokes |ViewRegistry.OnViewResolved| when the token is obtained
36 // from the owner or passes nullptr if an error occurs. 36 // from the owner or passes nullptr if an error occurs.
37 ViewStub(ViewRegistry* registry, mojo::ui::ViewOwnerPtr owner); 37 ViewStub(ViewRegistry* registry,
38 mojo::InterfaceHandle<mojo::ui::ViewOwner> owner);
38 ~ViewStub(); 39 ~ViewStub();
39 40
40 // Gets the view state referenced by the stub, or null if the view 41 // Gets the view state referenced by the stub, or null if the view
41 // has not yet been resolved or is unavailable. 42 // has not yet been resolved or is unavailable.
42 ViewState* state() const { return state_; } 43 ViewState* state() const { return state_; }
43 44
44 // Returns true if the view which was intended to be referenced by the 45 // Returns true if the view which was intended to be referenced by the
45 // stub has become unavailable. 46 // stub has become unavailable.
46 bool is_unavailable() const { return unavailable_; } 47 bool is_unavailable() const { return unavailable_; }
47 48
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 ViewTreeState* tree_ = nullptr; 102 ViewTreeState* tree_ = nullptr;
102 ViewState* parent_ = nullptr; 103 ViewState* parent_ = nullptr;
103 uint32_t key_ = 0u; 104 uint32_t key_ = 0u;
104 105
105 DISALLOW_COPY_AND_ASSIGN(ViewStub); 106 DISALLOW_COPY_AND_ASSIGN(ViewStub);
106 }; 107 };
107 108
108 } // namespace view_manager 109 } // namespace view_manager
109 110
110 #endif // SERVICES_UI_VIEW_MANAGER_VIEW_STUB_H_ 111 #endif // SERVICES_UI_VIEW_MANAGER_VIEW_STUB_H_
OLDNEW
« no previous file with comments | « services/ui/view_manager/view_registry.cc ('k') | services/ui/view_manager/view_stub.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698