| 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 "mash/simple_wm/simple_wm.h" | 5 #include "mash/simple_wm/simple_wm.h" |
| 6 | 6 |
| 7 #include "base/observer_list.h" | 7 #include "base/observer_list.h" |
| 8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
| 9 #include "mash/simple_wm/move_event_handler.h" | 9 #include "mash/simple_wm/move_event_handler.h" |
| 10 #include "ui/aura/client/aura_constants.h" | 10 #include "ui/aura/client/aura_constants.h" |
| (...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 366 display::Screen::SetScreenInstance(screen_.get()); | 366 display::Screen::SetScreenInstance(screen_.get()); |
| 367 aura_init_ = base::MakeUnique<views::AuraInit>( | 367 aura_init_ = base::MakeUnique<views::AuraInit>( |
| 368 context()->connector(), context()->identity(), "views_mus_resources.pak", | 368 context()->connector(), context()->identity(), "views_mus_resources.pak", |
| 369 std::string(), nullptr, views::AuraInit::Mode::AURA_MUS_WINDOW_MANAGER); | 369 std::string(), nullptr, views::AuraInit::Mode::AURA_MUS_WINDOW_MANAGER); |
| 370 window_tree_client_ = base::MakeUnique<aura::WindowTreeClient>( | 370 window_tree_client_ = base::MakeUnique<aura::WindowTreeClient>( |
| 371 context()->connector(), this, this); | 371 context()->connector(), this, this); |
| 372 aura::Env::GetInstance()->SetWindowTreeClient(window_tree_client_.get()); | 372 aura::Env::GetInstance()->SetWindowTreeClient(window_tree_client_.get()); |
| 373 window_tree_client_->ConnectAsWindowManager(); | 373 window_tree_client_->ConnectAsWindowManager(); |
| 374 } | 374 } |
| 375 | 375 |
| 376 bool SimpleWM::OnConnect( | |
| 377 const service_manager::ServiceInfo& remote_info, | |
| 378 service_manager::InterfaceRegistry* registry) { | |
| 379 return true; | |
| 380 } | |
| 381 | |
| 382 //////////////////////////////////////////////////////////////////////////////// | 376 //////////////////////////////////////////////////////////////////////////////// |
| 383 // SimpleWM, aura::WindowTreeClientDelegate implementation: | 377 // SimpleWM, aura::WindowTreeClientDelegate implementation: |
| 384 | 378 |
| 385 void SimpleWM::OnEmbed( | 379 void SimpleWM::OnEmbed( |
| 386 std::unique_ptr<aura::WindowTreeHostMus> window_tree_host) { | 380 std::unique_ptr<aura::WindowTreeHostMus> window_tree_host) { |
| 387 // WindowTreeClients configured as the window manager should never get | 381 // WindowTreeClients configured as the window manager should never get |
| 388 // OnEmbed(). | 382 // OnEmbed(). |
| 389 NOTREACHED(); | 383 NOTREACHED(); |
| 390 } | 384 } |
| 391 | 385 |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 584 } | 578 } |
| 585 | 579 |
| 586 void SimpleWM::OnWindowListViewItemActivated(aura::Window* window) { | 580 void SimpleWM::OnWindowListViewItemActivated(aura::Window* window) { |
| 587 window->Show(); | 581 window->Show(); |
| 588 aura::client::ActivationClient* activation_client = | 582 aura::client::ActivationClient* activation_client = |
| 589 aura::client::GetActivationClient(window->GetRootWindow()); | 583 aura::client::GetActivationClient(window->GetRootWindow()); |
| 590 activation_client->ActivateWindow(window); | 584 activation_client->ActivateWindow(window); |
| 591 } | 585 } |
| 592 | 586 |
| 593 } // namespace simple_wm | 587 } // namespace simple_wm |
| OLD | NEW |