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

Side by Side Diff: components/mus/ws/server_view.h

Issue 1406153004: components/mus/public/interfaces View => Window (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Yet another rebase Created 5 years, 2 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/ws/ids.h ('k') | components/mus/ws/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_MUS_WS_SERVER_VIEW_H_ 5 #ifndef COMPONENTS_MUS_WS_SERVER_VIEW_H_
6 #define COMPONENTS_MUS_WS_SERVER_VIEW_H_ 6 #define COMPONENTS_MUS_WS_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 "components/mus/public/interfaces/compositor_frame.mojom.h" 12 #include "components/mus/public/interfaces/compositor_frame.mojom.h"
13 #include "components/mus/public/interfaces/view_tree.mojom.h" 13 #include "components/mus/public/interfaces/window_tree.mojom.h"
14 #include "components/mus/ws/ids.h" 14 #include "components/mus/ws/ids.h"
15 #include "components/mus/ws/server_view_surface.h" 15 #include "components/mus/ws/server_view_surface.h"
16 #include "third_party/mojo/src/mojo/public/cpp/bindings/binding.h" 16 #include "third_party/mojo/src/mojo/public/cpp/bindings/binding.h"
17 #include "ui/gfx/geometry/rect.h" 17 #include "ui/gfx/geometry/rect.h"
18 #include "ui/gfx/transform.h" 18 #include "ui/gfx/transform.h"
19 #include "ui/platform_window/text_input_state.h" 19 #include "ui/platform_window/text_input_state.h"
20 20
21 namespace mus { 21 namespace mus {
22 22
23 class ServerViewDelegate; 23 class ServerViewDelegate;
(...skipping 12 matching lines...) Expand all
36 class ServerView { 36 class ServerView {
37 public: 37 public:
38 ServerView(ServerViewDelegate* delegate, const ViewId& id); 38 ServerView(ServerViewDelegate* delegate, const ViewId& id);
39 ~ServerView(); 39 ~ServerView();
40 40
41 void AddObserver(ServerViewObserver* observer); 41 void AddObserver(ServerViewObserver* observer);
42 void RemoveObserver(ServerViewObserver* observer); 42 void RemoveObserver(ServerViewObserver* observer);
43 43
44 // Binds the provided |request| to |this| object. If an interface is already 44 // Binds the provided |request| to |this| object. If an interface is already
45 // bound to this ServerView then the old connection is closed first. 45 // bound to this ServerView then the old connection is closed first.
46 void Bind(mojo::InterfaceRequest<mojo::Surface> request, 46 void Bind(mojo::InterfaceRequest<mojom::Surface> request,
47 mojo::SurfaceClientPtr client); 47 mojom::SurfaceClientPtr client);
48 48
49 const ViewId& id() const { return id_; } 49 const ViewId& id() const { return id_; }
50 50
51 void Add(ServerView* child); 51 void Add(ServerView* child);
52 void Remove(ServerView* child); 52 void Remove(ServerView* child);
53 void Reorder(ServerView* child, 53 void Reorder(ServerView* child,
54 ServerView* relative, 54 ServerView* relative,
55 mojo::OrderDirection direction); 55 mojom::OrderDirection direction);
56 56
57 const gfx::Rect& bounds() const { return bounds_; } 57 const gfx::Rect& bounds() const { return bounds_; }
58 // Sets the bounds. If the size changes this implicitly resets the client 58 // Sets the bounds. If the size changes this implicitly resets the client
59 // area to fill the whole bounds. 59 // area to fill the whole bounds.
60 void SetBounds(const gfx::Rect& bounds); 60 void SetBounds(const gfx::Rect& bounds);
61 61
62 const gfx::Rect& client_area() const { return client_area_; } 62 const gfx::Rect& client_area() const { return client_area_; }
63 void SetClientArea(const gfx::Rect& bounds); 63 void SetClientArea(const gfx::Rect& bounds);
64 64
65 const ServerView* parent() const { return parent_; } 65 const ServerView* parent() const { return parent_; }
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 std::map<std::string, std::vector<uint8_t>> properties_; 139 std::map<std::string, std::vector<uint8_t>> properties_;
140 140
141 base::ObserverList<ServerViewObserver> observers_; 141 base::ObserverList<ServerViewObserver> observers_;
142 142
143 DISALLOW_COPY_AND_ASSIGN(ServerView); 143 DISALLOW_COPY_AND_ASSIGN(ServerView);
144 }; 144 };
145 145
146 } // namespace mus 146 } // namespace mus
147 147
148 #endif // COMPONENTS_MUS_WS_SERVER_VIEW_H_ 148 #endif // COMPONENTS_MUS_WS_SERVER_VIEW_H_
OLDNEW
« no previous file with comments | « components/mus/ws/ids.h ('k') | components/mus/ws/server_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698