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

Side by Side Diff: components/mus/server_view.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/public/interfaces/view_tree_host.mojom ('k') | components/mus/server_view.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_SERVER_VIEW_H_ 5 #ifndef COMPONENTS_MUS_SERVER_VIEW_H_
6 #define COMPONENTS_VIEW_MANAGER_SERVER_VIEW_H_ 6 #define COMPONENTS_MUS_SERVER_VIEW_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/observer_list.h" 11 #include "base/observer_list.h"
12 #include "cc/surfaces/surface_factory.h" 12 #include "cc/surfaces/surface_factory.h"
13 #include "cc/surfaces/surface_factory_client.h" 13 #include "cc/surfaces/surface_factory_client.h"
14 #include "cc/surfaces/surface_id.h" 14 #include "cc/surfaces/surface_id.h"
15 #include "cc/surfaces/surface_id_allocator.h" 15 #include "cc/surfaces/surface_id_allocator.h"
16 #include "components/view_manager/ids.h" 16 #include "components/mus/ids.h"
17 #include "components/view_manager/public/interfaces/view_tree.mojom.h" 17 #include "components/mus/public/interfaces/view_tree.mojom.h"
18 #include "third_party/mojo/src/mojo/public/cpp/bindings/binding.h" 18 #include "third_party/mojo/src/mojo/public/cpp/bindings/binding.h"
19 #include "ui/gfx/geometry/rect.h" 19 #include "ui/gfx/geometry/rect.h"
20 #include "ui/gfx/transform.h" 20 #include "ui/gfx/transform.h"
21 #include "ui/platform_window/text_input_state.h" 21 #include "ui/platform_window/text_input_state.h"
22 22
23 namespace view_manager { 23 namespace view_manager {
24 24
25 class ServerViewDelegate; 25 class ServerViewDelegate;
26 class ServerViewObserver; 26 class ServerViewObserver;
27 27
28 // Server side representation of a view. Delegate is informed of interesting 28 // Server side representation of a view. Delegate is informed of interesting
29 // events. 29 // events.
30 // 30 //
31 // It is assumed that all functions that mutate the tree have validated the 31 // It is assumed that all functions that mutate the tree have validated the
32 // mutation is possible before hand. For example, Reorder() assumes the supplied 32 // mutation is possible before hand. For example, Reorder() assumes the supplied
33 // view is a child and not already in position. 33 // view is a child and not already in position.
34 // 34 //
35 // ServerViews do not own their children. If you delete a view that has children 35 // ServerViews do not own their children. If you delete a view that has children
36 // the children are implicitly removed. Similarly if a view has a parent and the 36 // the children are implicitly removed. Similarly if a view has a parent and the
37 // view is deleted the deleted view is implicitly removed from the parent. 37 // view is deleted the deleted view is implicitly removed from the parent.
38 class ServerView : public mojo::Surface, 38 class ServerView : public mojo::Surface, public cc::SurfaceFactoryClient {
39 public cc::SurfaceFactoryClient {
40 public: 39 public:
41 ServerView(ServerViewDelegate* delegate, const ViewId& id); 40 ServerView(ServerViewDelegate* delegate, const ViewId& id);
42 ~ServerView() override; 41 ~ServerView() override;
43 42
44 void AddObserver(ServerViewObserver* observer); 43 void AddObserver(ServerViewObserver* observer);
45 void RemoveObserver(ServerViewObserver* observer); 44 void RemoveObserver(ServerViewObserver* observer);
46 45
47 // Sets the access policy that is used the next time Embed() is called. 46 // Sets the access policy that is used the next time Embed() is called.
48 void set_pending_access_policy(uint32_t policy) { 47 void set_pending_access_policy(uint32_t policy) {
49 pending_access_policy_ = policy; 48 pending_access_policy_ = policy;
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 156
158 base::ObserverList<ServerViewObserver> observers_; 157 base::ObserverList<ServerViewObserver> observers_;
159 mojo::SurfaceClientPtr client_; 158 mojo::SurfaceClientPtr client_;
160 mojo::Binding<Surface> binding_; 159 mojo::Binding<Surface> binding_;
161 160
162 DISALLOW_COPY_AND_ASSIGN(ServerView); 161 DISALLOW_COPY_AND_ASSIGN(ServerView);
163 }; 162 };
164 163
165 } // namespace view_manager 164 } // namespace view_manager
166 165
167 #endif // COMPONENTS_VIEW_MANAGER_SERVER_VIEW_H_ 166 #endif // COMPONENTS_MUS_SERVER_VIEW_H_
OLDNEW
« no previous file with comments | « components/mus/public/interfaces/view_tree_host.mojom ('k') | components/mus/server_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698