| 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 "ash/mus/sysui_application.h" | 5 #include "ash/mus/sysui_application.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 return mash::wm::mojom::AshWindowType::STATUS_AREA; | 94 return mash::wm::mojom::AshWindowType::STATUS_AREA; |
| 95 return mash::wm::mojom::AshWindowType::COUNT; | 95 return mash::wm::mojom::AshWindowType::COUNT; |
| 96 } | 96 } |
| 97 | 97 |
| 98 // Creates a StubWindow, which means this window never receives any input event, | 98 // Creates a StubWindow, which means this window never receives any input event, |
| 99 // or displays anything to the user. | 99 // or displays anything to the user. |
| 100 class AshWindowTreeHostMus : public AshWindowTreeHostPlatform { | 100 class AshWindowTreeHostMus : public AshWindowTreeHostPlatform { |
| 101 public: | 101 public: |
| 102 explicit AshWindowTreeHostMus(const gfx::Rect& initial_bounds) | 102 explicit AshWindowTreeHostMus(const gfx::Rect& initial_bounds) |
| 103 : AshWindowTreeHostPlatform() { | 103 : AshWindowTreeHostPlatform() { |
| 104 std::unique_ptr<ui::PlatformWindow> window(new ui::StubWindow(this)); | 104 std::unique_ptr<ui::PlatformWindow> window( |
| 105 new ui::StubWindow(this, gfx::kNullAcceleratedWidget)); |
| 105 window->SetBounds(initial_bounds); | 106 window->SetBounds(initial_bounds); |
| 106 SetPlatformWindow(std::move(window)); | 107 SetPlatformWindow(std::move(window)); |
| 107 } | 108 } |
| 108 | 109 |
| 109 ~AshWindowTreeHostMus() override {} | 110 ~AshWindowTreeHostMus() override {} |
| 110 | 111 |
| 111 void OnBoundsChanged(const gfx::Rect& bounds) override { | 112 void OnBoundsChanged(const gfx::Rect& bounds) override { |
| 112 if (platform_window()) | 113 if (platform_window()) |
| 113 AshWindowTreeHostPlatform::OnBoundsChanged(bounds); | 114 AshWindowTreeHostPlatform::OnBoundsChanged(bounds); |
| 114 } | 115 } |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 void SysUIApplication::Create( | 327 void SysUIApplication::Create( |
| 327 ::shell::Connection* connection, | 328 ::shell::Connection* connection, |
| 328 mojo::InterfaceRequest<mash::shelf::mojom::ShelfController> request) { | 329 mojo::InterfaceRequest<mash::shelf::mojom::ShelfController> request) { |
| 329 mash::shelf::mojom::ShelfController* shelf_controller = | 330 mash::shelf::mojom::ShelfController* shelf_controller = |
| 330 static_cast<ShelfDelegateMus*>(Shell::GetInstance()->GetShelfDelegate()); | 331 static_cast<ShelfDelegateMus*>(Shell::GetInstance()->GetShelfDelegate()); |
| 331 shelf_controller_bindings_.AddBinding(shelf_controller, std::move(request)); | 332 shelf_controller_bindings_.AddBinding(shelf_controller, std::move(request)); |
| 332 } | 333 } |
| 333 | 334 |
| 334 } // namespace sysui | 335 } // namespace sysui |
| 335 } // namespace ash | 336 } // namespace ash |
| OLD | NEW |