| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "ui/views/mus/native_widget_mus.h" | 5 #include "ui/views/mus/native_widget_mus.h" |
| 6 | 6 |
| 7 #include "base/macros.h" | 7 #include "base/macros.h" |
| 8 #include "base/thread_task_runner_handle.h" | 8 #include "base/thread_task_runner_handle.h" |
| 9 #include "components/mus/public/cpp/property_type_converters.h" | 9 #include "components/mus/public/cpp/property_type_converters.h" |
| 10 #include "components/mus/public/cpp/window.h" | 10 #include "components/mus/public/cpp/window.h" |
| (...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 428 non_client_view->bounds().width() - client_area_rect.right())); | 428 non_client_view->bounds().width() - client_area_rect.right())); |
| 429 } | 429 } |
| 430 | 430 |
| 431 //////////////////////////////////////////////////////////////////////////////// | 431 //////////////////////////////////////////////////////////////////////////////// |
| 432 // NativeWidgetMus, private: | 432 // NativeWidgetMus, private: |
| 433 | 433 |
| 434 // static | 434 // static |
| 435 void NativeWidgetMus::ConfigurePropertiesForNewWindow( | 435 void NativeWidgetMus::ConfigurePropertiesForNewWindow( |
| 436 const Widget::InitParams& init_params, | 436 const Widget::InitParams& init_params, |
| 437 std::map<std::string, std::vector<uint8_t>>* properties) { | 437 std::map<std::string, std::vector<uint8_t>>* properties) { |
| 438 properties->insert(init_params.mus_properties.begin(), |
| 439 init_params.mus_properties.end()); |
| 438 if (!init_params.bounds.IsEmpty()) { | 440 if (!init_params.bounds.IsEmpty()) { |
| 439 (*properties)[mus::mojom::WindowManager::kUserSetBounds_Property] = | 441 (*properties)[mus::mojom::WindowManager::kUserSetBounds_Property] = |
| 440 mojo::ConvertTo<std::vector<uint8_t>>(init_params.bounds); | 442 mojo::ConvertTo<std::vector<uint8_t>>(init_params.bounds); |
| 441 } | 443 } |
| 442 if (!init_params.name.empty()) { | 444 if (!init_params.name.empty()) { |
| 443 (*properties)[mus::mojom::WindowManager::kName_Property] = | 445 (*properties)[mus::mojom::WindowManager::kName_Property] = |
| 444 mojo::ConvertTo<std::vector<uint8_t>>(init_params.name); | 446 mojo::ConvertTo<std::vector<uint8_t>>(init_params.name); |
| 445 } | 447 } |
| 446 | 448 |
| 447 if (!Widget::RequiresNonClientView(init_params.type)) | 449 if (!Widget::RequiresNonClientView(init_params.type)) |
| (...skipping 673 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1121 window_tree_host_->Show(); | 1123 window_tree_host_->Show(); |
| 1122 GetNativeWindow()->Show(); | 1124 GetNativeWindow()->Show(); |
| 1123 } else { | 1125 } else { |
| 1124 window_tree_host_->Hide(); | 1126 window_tree_host_->Hide(); |
| 1125 GetNativeWindow()->Hide(); | 1127 GetNativeWindow()->Hide(); |
| 1126 } | 1128 } |
| 1127 native_widget_delegate_->OnNativeWidgetVisibilityChanged(window->visible()); | 1129 native_widget_delegate_->OnNativeWidgetVisibilityChanged(window->visible()); |
| 1128 } | 1130 } |
| 1129 | 1131 |
| 1130 } // namespace views | 1132 } // namespace views |
| OLD | NEW |