| 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 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 404 } | 404 } |
| 405 | 405 |
| 406 //////////////////////////////////////////////////////////////////////////////// | 406 //////////////////////////////////////////////////////////////////////////////// |
| 407 // SimpleWM, aura::WindowManagerDelegate implementation: | 407 // SimpleWM, aura::WindowManagerDelegate implementation: |
| 408 | 408 |
| 409 void SimpleWM::SetWindowManagerClient( | 409 void SimpleWM::SetWindowManagerClient( |
| 410 aura::WindowManagerClient* client) { | 410 aura::WindowManagerClient* client) { |
| 411 window_manager_client_ = client; | 411 window_manager_client_ = client; |
| 412 } | 412 } |
| 413 | 413 |
| 414 void SimpleWM::OnWmConnected() {} |
| 415 |
| 414 void SimpleWM::OnWmSetBounds(aura::Window* window, const gfx::Rect& bounds) { | 416 void SimpleWM::OnWmSetBounds(aura::Window* window, const gfx::Rect& bounds) { |
| 415 FrameView* frame_view = GetFrameViewForClientWindow(window); | 417 FrameView* frame_view = GetFrameViewForClientWindow(window); |
| 416 frame_view->GetWidget()->SetBounds(bounds); | 418 frame_view->GetWidget()->SetBounds(bounds); |
| 417 } | 419 } |
| 418 | 420 |
| 419 bool SimpleWM::OnWmSetProperty( | 421 bool SimpleWM::OnWmSetProperty( |
| 420 aura::Window* window, | 422 aura::Window* window, |
| 421 const std::string& name, | 423 const std::string& name, |
| 422 std::unique_ptr<std::vector<uint8_t>>* new_data) { | 424 std::unique_ptr<std::vector<uint8_t>>* new_data) { |
| 423 return true; | 425 return true; |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 586 } | 588 } |
| 587 | 589 |
| 588 void SimpleWM::OnWindowListViewItemActivated(aura::Window* window) { | 590 void SimpleWM::OnWindowListViewItemActivated(aura::Window* window) { |
| 589 window->Show(); | 591 window->Show(); |
| 590 aura::client::ActivationClient* activation_client = | 592 aura::client::ActivationClient* activation_client = |
| 591 aura::client::GetActivationClient(window->GetRootWindow()); | 593 aura::client::GetActivationClient(window->GetRootWindow()); |
| 592 activation_client->ActivateWindow(window); | 594 activation_client->ActivateWindow(window); |
| 593 } | 595 } |
| 594 | 596 |
| 595 } // namespace simple_wm | 597 } // namespace simple_wm |
| OLD | NEW |