OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "ash/mus/window_manager.h" | 5 #include "ash/mus/window_manager.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
393 name == ui::mojom::WindowManager::kPreferredSize_Property || | 393 name == ui::mojom::WindowManager::kPreferredSize_Property || |
394 name == ui::mojom::WindowManager::kResizeBehavior_Property || | 394 name == ui::mojom::WindowManager::kResizeBehavior_Property || |
395 name == ui::mojom::WindowManager::kShelfItemType_Property || | 395 name == ui::mojom::WindowManager::kShelfItemType_Property || |
396 name == ui::mojom::WindowManager::kWindowIcon_Property || | 396 name == ui::mojom::WindowManager::kWindowIcon_Property || |
397 name == ui::mojom::WindowManager::kWindowTitle_Property; | 397 name == ui::mojom::WindowManager::kWindowTitle_Property; |
398 } | 398 } |
399 | 399 |
400 aura::Window* WindowManager::OnWmCreateTopLevelWindow( | 400 aura::Window* WindowManager::OnWmCreateTopLevelWindow( |
401 ui::mojom::WindowType window_type, | 401 ui::mojom::WindowType window_type, |
402 std::map<std::string, std::vector<uint8_t>>* properties) { | 402 std::map<std::string, std::vector<uint8_t>>* properties) { |
| 403 if (window_type == ui::mojom::WindowType::UNKNOWN) { |
| 404 LOG(WARNING) << "Request to create top level of unknown type, failing"; |
| 405 return nullptr; |
| 406 } |
| 407 |
403 return NewTopLevelWindow(window_type, properties); | 408 return NewTopLevelWindow(window_type, properties); |
404 } | 409 } |
405 | 410 |
406 void WindowManager::OnWmClientJankinessChanged( | 411 void WindowManager::OnWmClientJankinessChanged( |
407 const std::set<aura::Window*>& client_windows, | 412 const std::set<aura::Window*>& client_windows, |
408 bool janky) { | 413 bool janky) { |
409 for (auto* window : client_windows) | 414 for (auto* window : client_windows) |
410 window->SetProperty(kWindowIsJanky, janky); | 415 window->SetProperty(kWindowIsJanky, janky); |
411 } | 416 } |
412 | 417 |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
503 | 508 |
504 void WindowManager::OnWindowInitialized(aura::Window* window) { | 509 void WindowManager::OnWindowInitialized(aura::Window* window) { |
505 // This ensures WmWindowAura won't be called before WmWindowMus. This is | 510 // This ensures WmWindowAura won't be called before WmWindowMus. This is |
506 // important as if WmWindowAura::Get() is called first, then WmWindowAura | 511 // important as if WmWindowAura::Get() is called first, then WmWindowAura |
507 // would be created, not WmWindowMus. | 512 // would be created, not WmWindowMus. |
508 WmWindowMus::Get(window); | 513 WmWindowMus::Get(window); |
509 } | 514 } |
510 | 515 |
511 } // namespace mus | 516 } // namespace mus |
512 } // namespace ash | 517 } // namespace ash |
OLD | NEW |