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

Side by Side Diff: components/view_manager/view_tree_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
« no previous file with comments | « components/view_manager/view_tree_apptest.cc ('k') | components/view_manager/view_tree_impl.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 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_VIEW_TREE_IMPL_H_ 5 #ifndef COMPONENTS_VIEW_MANAGER_VIEW_TREE_IMPL_H_
6 #define COMPONENTS_VIEW_MANAGER_VIEW_TREE_IMPL_H_ 6 #define COMPONENTS_VIEW_MANAGER_VIEW_TREE_IMPL_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 bool visible, 190 bool visible,
191 const mojo::Callback<void(bool)>& callback) override; 191 const mojo::Callback<void(bool)>& callback) override;
192 void SetViewProperty(mojo::Id view_id, 192 void SetViewProperty(mojo::Id view_id,
193 const mojo::String& name, 193 const mojo::String& name,
194 mojo::Array<uint8_t> value, 194 mojo::Array<uint8_t> value,
195 const mojo::Callback<void(bool)>& callback) override; 195 const mojo::Callback<void(bool)>& callback) override;
196 void RequestSurface( 196 void RequestSurface(
197 mojo::Id view_id, 197 mojo::Id view_id,
198 mojo::InterfaceRequest<mojo::Surface> surface, 198 mojo::InterfaceRequest<mojo::Surface> surface,
199 mojo::SurfaceClientPtr client) override; 199 mojo::SurfaceClientPtr client) override;
200 void SetEmbedRoot() override;
201 void Embed(mojo::Id transport_view_id, 200 void Embed(mojo::Id transport_view_id,
202 mojo::ViewTreeClientPtr client, 201 mojo::ViewTreeClientPtr client,
203 const mojo::Callback<void(bool)>& callback) override; 202 const mojo::Callback<void(bool)>& callback) override;
204 void SetFocus(uint32_t view_id) override; 203 void SetFocus(uint32_t view_id) override;
205 void SetViewTextInputState(uint32_t view_id, 204 void SetViewTextInputState(uint32_t view_id,
206 mojo::TextInputStatePtr state) override; 205 mojo::TextInputStatePtr state) override;
207 void SetImeVisibility(uint32_t view_id, 206 void SetImeVisibility(mojo::Id transport_view_id,
208 bool visible, 207 bool visible,
209 mojo::TextInputStatePtr state) override; 208 mojo::TextInputStatePtr state) override;
210 209 void SetAccessPolicy(mojo::Id transport_view_id,
210 uint32 policy_bitmask) override;
211 211
212 // AccessPolicyDelegate: 212 // AccessPolicyDelegate:
213 bool IsRootForAccessPolicy(const ViewId& id) const override; 213 bool IsRootForAccessPolicy(const ViewId& id) const override;
214 bool IsViewKnownForAccessPolicy(const ServerView* view) const override; 214 bool IsViewKnownForAccessPolicy(const ServerView* view) const override;
215 bool IsViewRootOfAnotherConnectionForAccessPolicy( 215 bool IsViewRootOfAnotherConnectionForAccessPolicy(
216 const ServerView* view) const override; 216 const ServerView* view) const override;
217 bool IsDescendantOfEmbedRoot(const ServerView* view) override; 217 bool IsDescendantOfEmbedRoot(const ServerView* view) override;
218 218
219 ConnectionManager* connection_manager_; 219 ConnectionManager* connection_manager_;
220 220
221 // Id of this connection as assigned by ConnectionManager. 221 // Id of this connection as assigned by ConnectionManager.
222 const mojo::ConnectionSpecificId id_; 222 const mojo::ConnectionSpecificId id_;
223 223
224 // ID of the connection that created us. If 0 it indicates either we were 224 // ID of the connection that created us. If 0 it indicates either we were
225 // created by the root, or the connection that created us has been destroyed. 225 // created by the root, or the connection that created us has been destroyed.
226 mojo::ConnectionSpecificId creator_id_; 226 mojo::ConnectionSpecificId creator_id_;
227 227
228 mojo::ViewTreeClient* client_; 228 mojo::ViewTreeClient* client_;
229 229
230 scoped_ptr<AccessPolicy> access_policy_; 230 scoped_ptr<view_manager::AccessPolicy> access_policy_;
231 231
232 // The views created by this connection. This connection owns these objects. 232 // The views created by this connection. This connection owns these objects.
233 ViewMap view_map_; 233 ViewMap view_map_;
234 234
235 // The set of views that has been communicated to the client. 235 // The set of views that has been communicated to the client.
236 ViewIdSet known_views_; 236 ViewIdSet known_views_;
237 237
238 // The root of this connection. This is a scoped_ptr to reinforce the 238 // The root of this connection. This is a scoped_ptr to reinforce the
239 // connection may have no root. A connection has no root if either the root 239 // connection may have no root. A connection has no root if either the root
240 // is destroyed or Embed() is invoked on the root. 240 // is destroyed or Embed() is invoked on the root.
241 scoped_ptr<ViewId> root_; 241 scoped_ptr<ViewId> root_;
242 242
243 bool is_embed_root_; 243 bool is_embed_root_;
244 244
245 DISALLOW_COPY_AND_ASSIGN(ViewTreeImpl); 245 DISALLOW_COPY_AND_ASSIGN(ViewTreeImpl);
246 }; 246 };
247 247
248 } // namespace view_manager 248 } // namespace view_manager
249 249
250 #endif // COMPONENTS_VIEW_MANAGER_VIEW_TREE_IMPL_H_ 250 #endif // COMPONENTS_VIEW_MANAGER_VIEW_TREE_IMPL_H_
OLDNEW
« no previous file with comments | « components/view_manager/view_tree_apptest.cc ('k') | components/view_manager/view_tree_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698