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( | 104 std::unique_ptr<ui::PlatformWindow> window(new ui::StubWindow(this)); |
105 new ui::StubWindow(this, gfx::kNullAcceleratedWidget)); | |
106 window->SetBounds(initial_bounds); | 105 window->SetBounds(initial_bounds); |
107 SetPlatformWindow(std::move(window)); | 106 SetPlatformWindow(std::move(window)); |
108 } | 107 } |
109 | 108 |
110 ~AshWindowTreeHostMus() override {} | 109 ~AshWindowTreeHostMus() override {} |
111 | 110 |
112 void OnBoundsChanged(const gfx::Rect& bounds) override { | 111 void OnBoundsChanged(const gfx::Rect& bounds) override { |
113 if (platform_window()) | 112 if (platform_window()) |
114 AshWindowTreeHostPlatform::OnBoundsChanged(bounds); | 113 AshWindowTreeHostPlatform::OnBoundsChanged(bounds); |
115 } | 114 } |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
327 void SysUIApplication::Create( | 326 void SysUIApplication::Create( |
328 ::shell::Connection* connection, | 327 ::shell::Connection* connection, |
329 mojo::InterfaceRequest<mash::shelf::mojom::ShelfController> request) { | 328 mojo::InterfaceRequest<mash::shelf::mojom::ShelfController> request) { |
330 mash::shelf::mojom::ShelfController* shelf_controller = | 329 mash::shelf::mojom::ShelfController* shelf_controller = |
331 static_cast<ShelfDelegateMus*>(Shell::GetInstance()->GetShelfDelegate()); | 330 static_cast<ShelfDelegateMus*>(Shell::GetInstance()->GetShelfDelegate()); |
332 shelf_controller_bindings_.AddBinding(shelf_controller, std::move(request)); | 331 shelf_controller_bindings_.AddBinding(shelf_controller, std::move(request)); |
333 } | 332 } |
334 | 333 |
335 } // namespace sysui | 334 } // namespace sysui |
336 } // namespace ash | 335 } // namespace ash |
OLD | NEW |