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

Side by Side Diff: components/mus/public/cpp/window.h

Issue 1484533002: mus: Introduce AttachSurface to allow creating Surface prior to OnEmbed (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed Sadrul's comments Created 5 years 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_MUS_PUBLIC_CPP_WINDOW_H_ 5 #ifndef COMPONENTS_MUS_PUBLIC_CPP_WINDOW_H_
6 #define COMPONENTS_MUS_PUBLIC_CPP_WINDOW_H_ 6 #define COMPONENTS_MUS_PUBLIC_CPP_WINDOW_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 11 matching lines...) Expand all
22 22
23 namespace gfx { 23 namespace gfx {
24 class Size; 24 class Size;
25 } 25 }
26 26
27 namespace mus { 27 namespace mus {
28 28
29 class ServiceProviderImpl; 29 class ServiceProviderImpl;
30 class WindowObserver; 30 class WindowObserver;
31 class WindowSurface; 31 class WindowSurface;
32 class WindowSurfaceBinding;
32 class WindowTreeClientImpl; 33 class WindowTreeClientImpl;
33 class WindowTreeConnection; 34 class WindowTreeConnection;
34 35
35 namespace { 36 namespace {
36 class OrderChangedNotifier; 37 class OrderChangedNotifier;
37 } 38 }
38 39
39 // Defined in window_property.h (which we do not include) 40 // Defined in window_property.h (which we do not include)
40 template <typename T> 41 template <typename T>
41 struct WindowProperty; 42 struct WindowProperty;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 // A Window is drawn if the Window and all its ancestors are visible and the 81 // A Window is drawn if the Window and all its ancestors are visible and the
81 // Window is attached to the root. 82 // Window is attached to the root.
82 bool IsDrawn() const; 83 bool IsDrawn() const;
83 84
84 const mojom::ViewportMetrics& viewport_metrics() { 85 const mojom::ViewportMetrics& viewport_metrics() {
85 return *viewport_metrics_; 86 return *viewport_metrics_;
86 } 87 }
87 88
88 scoped_ptr<WindowSurface> RequestSurface(mojom::SurfaceType type); 89 scoped_ptr<WindowSurface> RequestSurface(mojom::SurfaceType type);
89 90
91 void AttachSurface(mojom::SurfaceType type,
92 scoped_ptr<WindowSurfaceBinding> surface_binding);
93
90 // The template-ized versions of the following methods rely on the presence 94 // The template-ized versions of the following methods rely on the presence
91 // of a mojo::TypeConverter<const std::vector<uint8_t>, T>. 95 // of a mojo::TypeConverter<const std::vector<uint8_t>, T>.
92 // Sets a shared property on the window which is sent to the window server and 96 // Sets a shared property on the window which is sent to the window server and
93 // shared with other clients that can view this window. 97 // shared with other clients that can view this window.
94 template <typename T> 98 template <typename T>
95 void SetSharedProperty(const std::string& name, const T& data); 99 void SetSharedProperty(const std::string& name, const T& data);
96 // Gets a shared property set on the window. The property must exist. Call 100 // Gets a shared property set on the window. The property must exist. Call
97 // HasSharedProperty() before calling. 101 // HasSharedProperty() before calling.
98 template <typename T> 102 template <typename T>
99 T GetSharedProperty(const std::string& name) const; 103 T GetSharedProperty(const std::string& name) const;
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 }; 293 };
290 294
291 std::map<const void*, Value> prop_map_; 295 std::map<const void*, Value> prop_map_;
292 296
293 MOJO_DISALLOW_COPY_AND_ASSIGN(Window); 297 MOJO_DISALLOW_COPY_AND_ASSIGN(Window);
294 }; 298 };
295 299
296 } // namespace mus 300 } // namespace mus
297 301
298 #endif // COMPONENTS_MUS_PUBLIC_CPP_WINDOW_H_ 302 #endif // COMPONENTS_MUS_PUBLIC_CPP_WINDOW_H_
OLDNEW
« no previous file with comments | « components/mus/public/cpp/tests/test_window_tree.cc ('k') | components/mus/public/cpp/window_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698