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

Side by Side Diff: components/view_manager/public/cpp/lib/view_tree_client_impl.h

Issue 1317713006: Changes around how embed roots are set (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge to trunk Created 5 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
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 COMPONENTS_VIEW_MANAGER_PUBLIC_CPP_LIB_VIEW_TREE_CLIENT_IMPL_H_ 5 #ifndef COMPONENTS_VIEW_MANAGER_PUBLIC_CPP_LIB_VIEW_TREE_CLIENT_IMPL_H_
6 #define COMPONENTS_VIEW_MANAGER_PUBLIC_CPP_LIB_VIEW_TREE_CLIENT_IMPL_H_ 6 #define COMPONENTS_VIEW_MANAGER_PUBLIC_CPP_LIB_VIEW_TREE_CLIENT_IMPL_H_
7 7
8 #include "components/view_manager/public/cpp/types.h" 8 #include "components/view_manager/public/cpp/types.h"
9 #include "components/view_manager/public/cpp/view.h" 9 #include "components/view_manager/public/cpp/view.h"
10 #include "components/view_manager/public/cpp/view_tree_connection.h" 10 #include "components/view_manager/public/cpp/view_tree_connection.h"
(...skipping 30 matching lines...) Expand all
41 bool OwnsView(Id id) const; 41 bool OwnsView(Id id) const;
42 42
43 void SetBounds(Id view_id, const Rect& bounds); 43 void SetBounds(Id view_id, const Rect& bounds);
44 void SetFocus(Id view_id); 44 void SetFocus(Id view_id);
45 void SetVisible(Id view_id, bool visible); 45 void SetVisible(Id view_id, bool visible);
46 void SetProperty(Id view_id, 46 void SetProperty(Id view_id,
47 const std::string& name, 47 const std::string& name,
48 const std::vector<uint8_t>& data); 48 const std::vector<uint8_t>& data);
49 void SetViewTextInputState(Id view_id, TextInputStatePtr state); 49 void SetViewTextInputState(Id view_id, TextInputStatePtr state);
50 void SetImeVisibility(Id view_id, bool visible, TextInputStatePtr state); 50 void SetImeVisibility(Id view_id, bool visible, TextInputStatePtr state);
51 void SetAccessPolicy(Id view_id, uint32_t access_policy);
51 52
52 void Embed(const String& url, Id view_id);
53 void Embed(mojo::URLRequestPtr request,
54 Id view_id,
55 InterfaceRequest<ServiceProvider> services,
56 ServiceProviderPtr exposed_services);
57 void Embed(Id view_id, ViewTreeClientPtr client); 53 void Embed(Id view_id, ViewTreeClientPtr client);
58 54
59 void RequestSurface(Id view_id, 55 void RequestSurface(Id view_id,
60 InterfaceRequest<Surface> surface, 56 InterfaceRequest<Surface> surface,
61 SurfaceClientPtr client); 57 SurfaceClientPtr client);
62 58
63 void set_change_acked_callback(const Callback<void(void)>& callback) { 59 void set_change_acked_callback(const Callback<void(void)>& callback) {
64 change_acked_callback_ = callback; 60 change_acked_callback_ = callback;
65 } 61 }
66 void ClearChangeAckedCallback() { change_acked_callback_.reset(); } 62 void ClearChangeAckedCallback() { change_acked_callback_.reset(); }
(...skipping 13 matching lines...) Expand all
80 private: 76 private:
81 typedef std::map<Id, View*> IdToViewMap; 77 typedef std::map<Id, View*> IdToViewMap;
82 78
83 Id CreateViewOnServer(); 79 Id CreateViewOnServer();
84 80
85 // Overridden from ViewTreeConnection: 81 // Overridden from ViewTreeConnection:
86 View* GetRoot() override; 82 View* GetRoot() override;
87 View* GetViewById(Id id) override; 83 View* GetViewById(Id id) override;
88 View* GetFocusedView() override; 84 View* GetFocusedView() override;
89 View* CreateView() override; 85 View* CreateView() override;
90 void SetEmbedRoot() override; 86 bool IsEmbedRoot() override;
91 87
92 // Overridden from ViewTreeClient: 88 // Overridden from ViewTreeClient:
93 void OnEmbed(ConnectionSpecificId connection_id, 89 void OnEmbed(ConnectionSpecificId connection_id,
94 ViewDataPtr root, 90 ViewDataPtr root,
95 ViewTreePtr tree, 91 ViewTreePtr tree,
96 Id focused_view_id) override; 92 Id focused_view_id,
93 uint32_t access_policy) override;
97 void OnEmbeddedAppDisconnected(Id view_id) override; 94 void OnEmbeddedAppDisconnected(Id view_id) override;
98 void OnUnembed() override; 95 void OnUnembed() override;
99 void OnViewBoundsChanged(Id view_id, 96 void OnViewBoundsChanged(Id view_id,
100 RectPtr old_bounds, 97 RectPtr old_bounds,
101 RectPtr new_bounds) override; 98 RectPtr new_bounds) override;
102 void OnViewViewportMetricsChanged(ViewportMetricsPtr old_metrics, 99 void OnViewViewportMetricsChanged(ViewportMetricsPtr old_metrics,
103 ViewportMetricsPtr new_metrics) override; 100 ViewportMetricsPtr new_metrics) override;
104 void OnViewHierarchyChanged(Id view_id, 101 void OnViewHierarchyChanged(Id view_id,
105 Id new_parent_id, 102 Id new_parent_id,
106 Id old_parent_id, 103 Id old_parent_id,
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 bool is_embed_root_; 143 bool is_embed_root_;
147 144
148 bool in_destructor_; 145 bool in_destructor_;
149 146
150 MOJO_DISALLOW_COPY_AND_ASSIGN(ViewTreeClientImpl); 147 MOJO_DISALLOW_COPY_AND_ASSIGN(ViewTreeClientImpl);
151 }; 148 };
152 149
153 } // namespace mojo 150 } // namespace mojo
154 151
155 #endif // COMPONENTS_VIEW_MANAGER_PUBLIC_CPP_LIB_VIEW_TREE_CLIENT_IMPL_H_ 152 #endif // COMPONENTS_VIEW_MANAGER_PUBLIC_CPP_LIB_VIEW_TREE_CLIENT_IMPL_H_
OLDNEW
« no previous file with comments | « components/view_manager/public/cpp/lib/view.cc ('k') | components/view_manager/public/cpp/lib/view_tree_client_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698