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

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

Issue 1906623003: Convert //components/mus from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 void SetPredefinedCursor(mus::mojom::Cursor cursor_id); 98 void SetPredefinedCursor(mus::mojom::Cursor cursor_id);
99 99
100 // A Window is drawn if the Window and all its ancestors are visible and the 100 // A Window is drawn if the Window and all its ancestors are visible and the
101 // Window is attached to the root. 101 // Window is attached to the root.
102 bool IsDrawn() const; 102 bool IsDrawn() const;
103 103
104 const mojom::ViewportMetrics& viewport_metrics() { 104 const mojom::ViewportMetrics& viewport_metrics() {
105 return *viewport_metrics_; 105 return *viewport_metrics_;
106 } 106 }
107 107
108 scoped_ptr<WindowSurface> RequestSurface(mojom::SurfaceType type); 108 std::unique_ptr<WindowSurface> RequestSurface(mojom::SurfaceType type);
109 109
110 void AttachSurface(mojom::SurfaceType type, 110 void AttachSurface(mojom::SurfaceType type,
111 scoped_ptr<WindowSurfaceBinding> surface_binding); 111 std::unique_ptr<WindowSurfaceBinding> surface_binding);
112 112
113 // The template-ized versions of the following methods rely on the presence 113 // The template-ized versions of the following methods rely on the presence
114 // of a mojo::TypeConverter<const std::vector<uint8_t>, T>. 114 // of a mojo::TypeConverter<const std::vector<uint8_t>, T>.
115 // Sets a shared property on the window which is sent to the window server and 115 // Sets a shared property on the window which is sent to the window server and
116 // shared with other clients that can view this window. 116 // shared with other clients that can view this window.
117 template <typename T> 117 template <typename T>
118 void SetSharedProperty(const std::string& name, const T& data); 118 void SetSharedProperty(const std::string& name, const T& data);
119 // Gets a shared property set on the window. The property must exist. Call 119 // Gets a shared property set on the window. The property must exist. Call
120 // HasSharedProperty() before calling. 120 // HasSharedProperty() before calling.
121 template <typename T> 121 template <typename T>
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 }; 345 };
346 346
347 std::map<const void*, Value> prop_map_; 347 std::map<const void*, Value> prop_map_;
348 348
349 DISALLOW_COPY_AND_ASSIGN(Window); 349 DISALLOW_COPY_AND_ASSIGN(Window);
350 }; 350 };
351 351
352 } // namespace mus 352 } // namespace mus
353 353
354 #endif // COMPONENTS_MUS_PUBLIC_CPP_WINDOW_H_ 354 #endif // COMPONENTS_MUS_PUBLIC_CPP_WINDOW_H_
OLDNEW
« no previous file with comments | « components/mus/public/cpp/tests/window_unittest.cc ('k') | components/mus/public/cpp/window_manager_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698