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