| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |