Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Side by Side Diff: ash/mus/sysui_application.cc

Issue 1999083002: Finish eliminating PlatformWindowMus (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ash/host/ash_window_tree_host_unified.cc ('k') | blimp/engine/app/ui/blimp_window_tree_host.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « ash/host/ash_window_tree_host_unified.cc ('k') | blimp/engine/app/ui/blimp_window_tree_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698