| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/callback.h" | 7 #include "base/callback.h" |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "services/ui/public/cpp/property_type_converters.h" | 9 #include "services/ui/public/cpp/property_type_converters.h" |
| 10 #include "services/ui/public/cpp/tests/window_tree_client_private.h" | 10 #include "services/ui/public/cpp/tests/window_tree_client_private.h" |
| (...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 593 // NOTE: the order here is important, we purposefully add the | 593 // NOTE: the order here is important, we purposefully add the |
| 594 // ui::WindowObserver before creating NativeWidgetMus, which also adds its | 594 // ui::WindowObserver before creating NativeWidgetMus, which also adds its |
| 595 // own observer. | 595 // own observer. |
| 596 window->AddObserver(&observer); | 596 window->AddObserver(&observer); |
| 597 | 597 |
| 598 std::unique_ptr<Widget> widget(new Widget()); | 598 std::unique_ptr<Widget> widget(new Widget()); |
| 599 observer.set_widget(widget.get()); | 599 observer.set_widget(widget.get()); |
| 600 Widget::InitParams params = CreateParams(Widget::InitParams::TYPE_WINDOW); | 600 Widget::InitParams params = CreateParams(Widget::InitParams::TYPE_WINDOW); |
| 601 params.ownership = Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; | 601 params.ownership = Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; |
| 602 params.bounds = initial_bounds(); | 602 params.bounds = initial_bounds(); |
| 603 params.native_widget = new NativeWidgetMus(widget.get(), window, | 603 params.native_widget = new NativeWidgetMus( |
| 604 ui::mojom::SurfaceType::DEFAULT); | 604 widget.get(), window, ui::mojom::CompositorFrameSinkType::DEFAULT); |
| 605 widget->Init(params); | 605 widget->Init(params); |
| 606 window->SetSharedProperty<int32_t>( | 606 window->SetSharedProperty<int32_t>( |
| 607 ui::mojom::WindowManager::kShowState_Property, | 607 ui::mojom::WindowManager::kShowState_Property, |
| 608 static_cast<uint32_t>(ui::mojom::ShowState::MAXIMIZED)); | 608 static_cast<uint32_t>(ui::mojom::ShowState::MAXIMIZED)); |
| 609 EXPECT_TRUE(widget->IsMaximized()); | 609 EXPECT_TRUE(widget->IsMaximized()); |
| 610 } | 610 } |
| 611 | 611 |
| 612 } // namespace views | 612 } // namespace views |
| OLD | NEW |