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

Side by Side Diff: components/mus/public/cpp/lib/window.cc

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 #include "components/mus/public/cpp/window.h" 5 #include "components/mus/public/cpp/window.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <set> 10 #include <set>
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 tree_client()->SetPredefinedCursor(server_id_, cursor_id); 240 tree_client()->SetPredefinedCursor(server_id_, cursor_id);
241 LocalSetPredefinedCursor(cursor_id); 241 LocalSetPredefinedCursor(cursor_id);
242 } 242 }
243 243
244 bool Window::IsDrawn() const { 244 bool Window::IsDrawn() const {
245 if (!visible_) 245 if (!visible_)
246 return false; 246 return false;
247 return parent_ ? parent_->IsDrawn() : parent_drawn_; 247 return parent_ ? parent_->IsDrawn() : parent_drawn_;
248 } 248 }
249 249
250 scoped_ptr<WindowSurface> Window::RequestSurface(mojom::SurfaceType type) { 250 std::unique_ptr<WindowSurface> Window::RequestSurface(mojom::SurfaceType type) {
251 scoped_ptr<WindowSurfaceBinding> surface_binding; 251 std::unique_ptr<WindowSurfaceBinding> surface_binding;
252 scoped_ptr<WindowSurface> surface = WindowSurface::Create(&surface_binding); 252 std::unique_ptr<WindowSurface> surface =
253 WindowSurface::Create(&surface_binding);
253 AttachSurface(type, std::move(surface_binding)); 254 AttachSurface(type, std::move(surface_binding));
254 return surface; 255 return surface;
255 } 256 }
256 257
257 void Window::AttachSurface(mojom::SurfaceType type, 258 void Window::AttachSurface(
258 scoped_ptr<WindowSurfaceBinding> surface_binding) { 259 mojom::SurfaceType type,
260 std::unique_ptr<WindowSurfaceBinding> surface_binding) {
259 tree_client()->AttachSurface( 261 tree_client()->AttachSurface(
260 server_id_, type, std::move(surface_binding->surface_request_), 262 server_id_, type, std::move(surface_binding->surface_request_),
261 mojo::MakeProxy(std::move(surface_binding->surface_client_))); 263 mojo::MakeProxy(std::move(surface_binding->surface_client_)));
262 } 264 }
263 265
264 void Window::ClearSharedProperty(const std::string& name) { 266 void Window::ClearSharedProperty(const std::string& name) {
265 SetSharedPropertyInternal(name, nullptr); 267 SetSharedPropertyInternal(name, nullptr);
266 } 268 }
267 269
268 bool Window::HasSharedProperty(const std::string& name) const { 270 bool Window::HasSharedProperty(const std::string& name) const {
(...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after
865 notifier->NotifyWindowReordered(); 867 notifier->NotifyWindowReordered();
866 868
867 return true; 869 return true;
868 } 870 }
869 871
870 // static 872 // static
871 Window** Window::GetStackingTarget(Window* window) { 873 Window** Window::GetStackingTarget(Window* window) {
872 return &window->stacking_target_; 874 return &window->stacking_target_;
873 } 875 }
874 } // namespace mus 876 } // namespace mus
OLDNEW
« no previous file with comments | « components/mus/public/cpp/lib/output_surface.cc ('k') | components/mus/public/cpp/lib/window_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698