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

Side by Side Diff: components/mus/view_tree_impl.h

Issue 1344573002: Mandoline: Rename components/view_manager to components/mus (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased 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/mus/view_tree_host_impl.cc ('k') | components/mus/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_MUS_VIEW_TREE_IMPL_H_
6 #define COMPONENTS_VIEW_MANAGER_VIEW_TREE_IMPL_H_ 6 #define COMPONENTS_MUS_VIEW_TREE_IMPL_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/basictypes.h" 12 #include "base/basictypes.h"
13 #include "base/containers/hash_tables.h" 13 #include "base/containers/hash_tables.h"
14 #include "base/memory/ref_counted.h" 14 #include "base/memory/ref_counted.h"
15 #include "base/memory/scoped_ptr.h" 15 #include "base/memory/scoped_ptr.h"
16 #include "components/view_manager/access_policy_delegate.h" 16 #include "components/mus/access_policy_delegate.h"
17 #include "components/view_manager/ids.h" 17 #include "components/mus/ids.h"
18 #include "components/view_manager/public/interfaces/surface_id.mojom.h" 18 #include "components/mus/public/interfaces/surface_id.mojom.h"
19 #include "components/view_manager/public/interfaces/view_tree.mojom.h" 19 #include "components/mus/public/interfaces/view_tree.mojom.h"
20 20
21 namespace gfx { 21 namespace gfx {
22 class Rect; 22 class Rect;
23 } 23 }
24 24
25 namespace view_manager { 25 namespace view_manager {
26 26
27 class AccessPolicy; 27 class AccessPolicy;
28 class ConnectionManager; 28 class ConnectionManager;
29 class ServerView; 29 class ServerView;
30 class ViewTreeHostImpl; 30 class ViewTreeHostImpl;
31 31
32 // An instance of ViewTreeImpl is created for every ViewTree request. 32 // An instance of ViewTreeImpl is created for every ViewTree request.
33 // ViewTreeImpl tracks all the state and views created by a client. ViewTreeImpl 33 // ViewTreeImpl tracks all the state and views created by a client. ViewTreeImpl
34 // coordinates with ConnectionManager to update the client (and internal state) 34 // coordinates with ConnectionManager to update the client (and internal state)
35 // as necessary. 35 // as necessary.
36 class ViewTreeImpl : public mojo::ViewTree, public AccessPolicyDelegate { 36 class ViewTreeImpl : public mojo::ViewTree, public AccessPolicyDelegate {
37 public: 37 public:
38 ViewTreeImpl(ConnectionManager* connection_manager, 38 ViewTreeImpl(ConnectionManager* connection_manager,
39 mojo::ConnectionSpecificId creator_id, 39 mojo::ConnectionSpecificId creator_id,
40 const ViewId& root_id); 40 const ViewId& root_id);
41 ~ViewTreeImpl() override; 41 ~ViewTreeImpl() override;
42 42
43 // |services| and |exposed_services| are the ServiceProviders to pass to the 43 // |services| and |exposed_services| are the ServiceProviders to pass to the
44 // client via OnEmbed(). 44 // client via OnEmbed().
45 void Init(mojo::ViewTreeClient* client, mojo::ViewTreePtr tree); 45 void Init(mojo::ViewTreeClient* client, mojo::ViewTreePtr tree);
46 46
47 mojo::ConnectionSpecificId id() const { return id_; } 47 mojo::ConnectionSpecificId id() const { return id_; }
48 mojo::ConnectionSpecificId creator_id() const { return creator_id_; } 48 mojo::ConnectionSpecificId creator_id() const { return creator_id_; }
49 49
50 mojo::ViewTreeClient* client() { return client_; } 50 mojo::ViewTreeClient* client() { return client_; }
51 51
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 void SetViewBounds(mojo::Id view_id, 188 void SetViewBounds(mojo::Id view_id,
189 mojo::RectPtr bounds, 189 mojo::RectPtr bounds,
190 const mojo::Callback<void(bool)>& callback) override; 190 const mojo::Callback<void(bool)>& callback) override;
191 void SetViewVisibility(mojo::Id view_id, 191 void SetViewVisibility(mojo::Id view_id,
192 bool visible, 192 bool visible,
193 const mojo::Callback<void(bool)>& callback) override; 193 const mojo::Callback<void(bool)>& callback) override;
194 void SetViewProperty(mojo::Id view_id, 194 void SetViewProperty(mojo::Id view_id,
195 const mojo::String& name, 195 const mojo::String& name,
196 mojo::Array<uint8_t> value, 196 mojo::Array<uint8_t> value,
197 const mojo::Callback<void(bool)>& callback) override; 197 const mojo::Callback<void(bool)>& callback) override;
198 void RequestSurface( 198 void RequestSurface(mojo::Id view_id,
199 mojo::Id view_id, 199 mojo::InterfaceRequest<mojo::Surface> surface,
200 mojo::InterfaceRequest<mojo::Surface> surface, 200 mojo::SurfaceClientPtr client) override;
201 mojo::SurfaceClientPtr client) override;
202 void Embed(mojo::Id transport_view_id, 201 void Embed(mojo::Id transport_view_id,
203 mojo::ViewTreeClientPtr client, 202 mojo::ViewTreeClientPtr client,
204 const EmbedCallback& callback) override; 203 const EmbedCallback& callback) override;
205 void SetFocus(uint32_t view_id) override; 204 void SetFocus(uint32_t view_id) override;
206 void SetViewTextInputState(uint32_t view_id, 205 void SetViewTextInputState(uint32_t view_id,
207 mojo::TextInputStatePtr state) override; 206 mojo::TextInputStatePtr state) override;
208 void SetImeVisibility(mojo::Id transport_view_id, 207 void SetImeVisibility(mojo::Id transport_view_id,
209 bool visible, 208 bool visible,
210 mojo::TextInputStatePtr state) override; 209 mojo::TextInputStatePtr state) override;
211 void SetAccessPolicy(mojo::Id transport_view_id, 210 void SetAccessPolicy(mojo::Id transport_view_id,
(...skipping 30 matching lines...) Expand all
242 // is destroyed or Embed() is invoked on the root. 241 // is destroyed or Embed() is invoked on the root.
243 scoped_ptr<ViewId> root_; 242 scoped_ptr<ViewId> root_;
244 243
245 bool is_embed_root_; 244 bool is_embed_root_;
246 245
247 DISALLOW_COPY_AND_ASSIGN(ViewTreeImpl); 246 DISALLOW_COPY_AND_ASSIGN(ViewTreeImpl);
248 }; 247 };
249 248
250 } // namespace view_manager 249 } // namespace view_manager
251 250
252 #endif // COMPONENTS_VIEW_MANAGER_VIEW_TREE_IMPL_H_ 251 #endif // COMPONENTS_MUS_VIEW_TREE_IMPL_H_
OLDNEW
« no previous file with comments | « components/mus/view_tree_host_impl.cc ('k') | components/mus/view_tree_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698