| 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 bool SimpleWM::OnWmSetBounds(aura::Window* window, gfx::Rect* bounds) { | 414 void SimpleWM::OnWmSetBounds(aura::Window* window, const gfx::Rect& bounds) { |
| 415 FrameView* frame_view = GetFrameViewForClientWindow(window); | 415 FrameView* frame_view = GetFrameViewForClientWindow(window); |
| 416 frame_view->GetWidget()->SetBounds(*bounds); | 416 frame_view->GetWidget()->SetBounds(bounds); |
| 417 return false; | |
| 418 } | 417 } |
| 419 | 418 |
| 420 bool SimpleWM::OnWmSetProperty( | 419 bool SimpleWM::OnWmSetProperty( |
| 421 aura::Window* window, | 420 aura::Window* window, |
| 422 const std::string& name, | 421 const std::string& name, |
| 423 std::unique_ptr<std::vector<uint8_t>>* new_data) { | 422 std::unique_ptr<std::vector<uint8_t>>* new_data) { |
| 424 return true; | 423 return true; |
| 425 } | 424 } |
| 426 | 425 |
| 427 void SimpleWM::OnWmSetModalType(aura::Window* window, ui::ModalType type) {} | 426 void SimpleWM::OnWmSetModalType(aura::Window* window, ui::ModalType type) {} |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 587 } | 586 } |
| 588 | 587 |
| 589 void SimpleWM::OnWindowListViewItemActivated(aura::Window* window) { | 588 void SimpleWM::OnWindowListViewItemActivated(aura::Window* window) { |
| 590 window->Show(); | 589 window->Show(); |
| 591 aura::client::ActivationClient* activation_client = | 590 aura::client::ActivationClient* activation_client = |
| 592 aura::client::GetActivationClient(window->GetRootWindow()); | 591 aura::client::GetActivationClient(window->GetRootWindow()); |
| 593 activation_client->ActivateWindow(window); | 592 activation_client->ActivateWindow(window); |
| 594 } | 593 } |
| 595 | 594 |
| 596 } // namespace simple_wm | 595 } // namespace simple_wm |
| OLD | NEW |