| 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 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 417 return false; | 417 return false; |
| 418 } | 418 } |
| 419 | 419 |
| 420 bool SimpleWM::OnWmSetProperty( | 420 bool SimpleWM::OnWmSetProperty( |
| 421 aura::Window* window, | 421 aura::Window* window, |
| 422 const std::string& name, | 422 const std::string& name, |
| 423 std::unique_ptr<std::vector<uint8_t>>* new_data) { | 423 std::unique_ptr<std::vector<uint8_t>>* new_data) { |
| 424 return true; | 424 return true; |
| 425 } | 425 } |
| 426 | 426 |
| 427 bool SimpleWM::OnWmSetModalType(aura::Window* window, ui::ModalType type) { |
| 428 return true; |
| 429 } |
| 430 |
| 427 void SimpleWM::OnWmSetCanFocus(aura::Window* window, bool can_focus) {} | 431 void SimpleWM::OnWmSetCanFocus(aura::Window* window, bool can_focus) {} |
| 428 | 432 |
| 429 aura::Window* SimpleWM::OnWmCreateTopLevelWindow( | 433 aura::Window* SimpleWM::OnWmCreateTopLevelWindow( |
| 430 ui::mojom::WindowType window_type, | 434 ui::mojom::WindowType window_type, |
| 431 std::map<std::string, std::vector<uint8_t>>* properties) { | 435 std::map<std::string, std::vector<uint8_t>>* properties) { |
| 432 aura::Window* client_window = new aura::Window(nullptr); | 436 aura::Window* client_window = new aura::Window(nullptr); |
| 433 SetWindowType(client_window, window_type); | 437 SetWindowType(client_window, window_type); |
| 434 client_window->Init(ui::LAYER_NOT_DRAWN); | 438 client_window->Init(ui::LAYER_NOT_DRAWN); |
| 435 | 439 |
| 436 views::Widget* frame_widget = new views::Widget; | 440 views::Widget* frame_widget = new views::Widget; |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 576 } | 580 } |
| 577 | 581 |
| 578 void SimpleWM::OnWindowListViewItemActivated(aura::Window* window) { | 582 void SimpleWM::OnWindowListViewItemActivated(aura::Window* window) { |
| 579 window->Show(); | 583 window->Show(); |
| 580 aura::client::ActivationClient* activation_client = | 584 aura::client::ActivationClient* activation_client = |
| 581 aura::client::GetActivationClient(window->GetRootWindow()); | 585 aura::client::GetActivationClient(window->GetRootWindow()); |
| 582 activation_client->ActivateWindow(window); | 586 activation_client->ActivateWindow(window); |
| 583 } | 587 } |
| 584 | 588 |
| 585 } // namespace simple_wm | 589 } // namespace simple_wm |
| OLD | NEW |