| 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 "ash/desktop_background/desktop_background_controller.h" | 7 #include "ash/desktop_background/desktop_background_controller.h" |
| 8 #include "ash/host/ash_window_tree_host_init_params.h" | 8 #include "ash/host/ash_window_tree_host_init_params.h" |
| 9 #include "ash/host/ash_window_tree_host_platform.h" | 9 #include "ash/host/ash_window_tree_host_platform.h" |
| 10 #include "ash/mus/keyboard_ui_mus.h" | 10 #include "ash/mus/keyboard_ui_mus.h" |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 return mash::wm::mojom::AshWindowType::STATUS_AREA; | 81 return mash::wm::mojom::AshWindowType::STATUS_AREA; |
| 82 return mash::wm::mojom::AshWindowType::COUNT; | 82 return mash::wm::mojom::AshWindowType::COUNT; |
| 83 } | 83 } |
| 84 | 84 |
| 85 // Creates a StubWindow, which means this window never receives any input event, | 85 // Creates a StubWindow, which means this window never receives any input event, |
| 86 // or displays anything to the user. | 86 // or displays anything to the user. |
| 87 class AshWindowTreeHostMus : public AshWindowTreeHostPlatform { | 87 class AshWindowTreeHostMus : public AshWindowTreeHostPlatform { |
| 88 public: | 88 public: |
| 89 explicit AshWindowTreeHostMus(const gfx::Rect& initial_bounds) | 89 explicit AshWindowTreeHostMus(const gfx::Rect& initial_bounds) |
| 90 : AshWindowTreeHostPlatform() { | 90 : AshWindowTreeHostPlatform() { |
| 91 scoped_ptr<ui::PlatformWindow> window(new ui::StubWindow(this)); | 91 std::unique_ptr<ui::PlatformWindow> window(new ui::StubWindow(this)); |
| 92 window->SetBounds(initial_bounds); | 92 window->SetBounds(initial_bounds); |
| 93 SetPlatformWindow(std::move(window)); | 93 SetPlatformWindow(std::move(window)); |
| 94 } | 94 } |
| 95 | 95 |
| 96 ~AshWindowTreeHostMus() override {} | 96 ~AshWindowTreeHostMus() override {} |
| 97 | 97 |
| 98 void OnBoundsChanged(const gfx::Rect& bounds) override { | 98 void OnBoundsChanged(const gfx::Rect& bounds) override { |
| 99 if (platform_window()) | 99 if (platform_window()) |
| 100 AshWindowTreeHostPlatform::OnBoundsChanged(bounds); | 100 AshWindowTreeHostPlatform::OnBoundsChanged(bounds); |
| 101 } | 101 } |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 268 bluez::BluezDBusManager::Initialize( | 268 bluez::BluezDBusManager::Initialize( |
| 269 chromeos::DBusThreadManager::Get()->GetSystemBus(), | 269 chromeos::DBusThreadManager::Get()->GetSystemBus(), |
| 270 chromeos::DBusThreadManager::Get()->IsUsingStub( | 270 chromeos::DBusThreadManager::Get()->IsUsingStub( |
| 271 chromeos::DBusClientBundle::BLUETOOTH)); | 271 chromeos::DBusClientBundle::BLUETOOTH)); |
| 272 chromeos::CrasAudioHandler::InitializeForTesting(); | 272 chromeos::CrasAudioHandler::InitializeForTesting(); |
| 273 #endif | 273 #endif |
| 274 } | 274 } |
| 275 | 275 |
| 276 private: | 276 private: |
| 277 scoped_refptr<base::SequencedWorkerPool> worker_pool_; | 277 scoped_refptr<base::SequencedWorkerPool> worker_pool_; |
| 278 scoped_ptr<views::AuraInit> aura_init_; | 278 std::unique_ptr<views::AuraInit> aura_init_; |
| 279 ShellDelegateMus* ash_delegate_ = nullptr; | 279 ShellDelegateMus* ash_delegate_ = nullptr; |
| 280 scoped_ptr<NativeWidgetFactory> native_widget_factory_; | 280 std::unique_ptr<NativeWidgetFactory> native_widget_factory_; |
| 281 | 281 |
| 282 DISALLOW_COPY_AND_ASSIGN(AshInit); | 282 DISALLOW_COPY_AND_ASSIGN(AshInit); |
| 283 }; | 283 }; |
| 284 | 284 |
| 285 SysUIApplication::SysUIApplication() {} | 285 SysUIApplication::SysUIApplication() {} |
| 286 | 286 |
| 287 SysUIApplication::~SysUIApplication() {} | 287 SysUIApplication::~SysUIApplication() {} |
| 288 | 288 |
| 289 void SysUIApplication::Initialize(mojo::Connector* connector, | 289 void SysUIApplication::Initialize(mojo::Connector* connector, |
| 290 const mojo::Identity& identity, | 290 const mojo::Identity& identity, |
| 291 uint32_t id) { | 291 uint32_t id) { |
| 292 ash_init_.reset(new AshInit()); | 292 ash_init_.reset(new AshInit()); |
| 293 ash_init_->Initialize(connector); | 293 ash_init_->Initialize(connector); |
| 294 } | 294 } |
| 295 | 295 |
| 296 bool SysUIApplication::AcceptConnection(mojo::Connection* connection) { | 296 bool SysUIApplication::AcceptConnection(mojo::Connection* connection) { |
| 297 return true; | 297 return true; |
| 298 } | 298 } |
| 299 | 299 |
| 300 } // namespace sysui | 300 } // namespace sysui |
| 301 } // namespace ash | 301 } // namespace ash |
| OLD | NEW |