| 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/lib/window_private.h" | 5 #include "services/ui/public/cpp/lib/window_private.h" |
| 6 | 6 |
| 7 namespace mus { | 7 namespace mus { |
| 8 | 8 |
| 9 WindowPrivate::WindowPrivate(Window* window) : window_(window) { | 9 WindowPrivate::WindowPrivate(Window* window) : window_(window) { |
| 10 CHECK(window); | 10 CHECK(window); |
| 11 } | 11 } |
| 12 | 12 |
| 13 WindowPrivate::~WindowPrivate() {} | 13 WindowPrivate::~WindowPrivate() {} |
| 14 | 14 |
| 15 // static | 15 // static |
| 16 Window* WindowPrivate::LocalCreate() { | 16 Window* WindowPrivate::LocalCreate() { |
| 17 return new Window; | 17 return new Window; |
| 18 } | 18 } |
| 19 | 19 |
| 20 void WindowPrivate::LocalSetSharedProperty(const std::string& name, | 20 void WindowPrivate::LocalSetSharedProperty(const std::string& name, |
| 21 mojo::Array<uint8_t> new_data) { | 21 mojo::Array<uint8_t> new_data) { |
| 22 std::vector<uint8_t> data; | 22 std::vector<uint8_t> data; |
| 23 std::vector<uint8_t>* data_ptr = nullptr; | 23 std::vector<uint8_t>* data_ptr = nullptr; |
| 24 if (!new_data.is_null()) { | 24 if (!new_data.is_null()) { |
| 25 data = new_data.To<std::vector<uint8_t>>(); | 25 data = new_data.To<std::vector<uint8_t>>(); |
| 26 data_ptr = &data; | 26 data_ptr = &data; |
| 27 } | 27 } |
| 28 LocalSetSharedProperty(name, data_ptr); | 28 LocalSetSharedProperty(name, data_ptr); |
| 29 } | 29 } |
| 30 | 30 |
| 31 } // namespace mus | 31 } // namespace mus |
| OLD | NEW |