OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "ui/aura/mus/window_tree_client.h" | 5 #include "ui/aura/mus/window_tree_client.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
472 | 472 |
473 void WindowTreeClient::OnConnectionLost() { | 473 void WindowTreeClient::OnConnectionLost() { |
474 delegate_->OnLostConnection(this); | 474 delegate_->OnLostConnection(this); |
475 } | 475 } |
476 | 476 |
477 bool WindowTreeClient::HandleInternalPropertyChanged(WindowMus* window, | 477 bool WindowTreeClient::HandleInternalPropertyChanged(WindowMus* window, |
478 const void* key) { | 478 const void* key) { |
479 if (key != client::kModalKey) | 479 if (key != client::kModalKey) |
480 return false; | 480 return false; |
481 | 481 |
482 if (window->GetWindow()->GetProperty(client::kModalKey) == | |
483 ui::MODAL_TYPE_NONE) { | |
484 // TODO: shouldn't early return, but explicitly tell server to turn off | |
485 // modality. http://crbug.com/660073. | |
486 return true; | |
487 } | |
488 | |
489 const uint32_t change_id = | 482 const uint32_t change_id = |
490 ScheduleInFlightChange(base::MakeUnique<InFlightSetModalChange>(window)); | 483 ScheduleInFlightChange(base::MakeUnique<InFlightSetModalChange>(window)); |
sky
2017/03/01 00:13:43
Don't you need to change InFlightSetModalChange to
Hadi
2017/03/06 20:07:05
Done. There was a test for TYPE_MODAL_NONE to TYPE
| |
491 // TODO: this is subtly different that explicitly specifying a type. | 484 tree_->SetModal(change_id, window->server_id(), |
492 // http://crbug.com/660073. | 485 window->GetWindow()->GetProperty(client::kModalKey)); |
493 tree_->SetModal(change_id, window->server_id()); | |
494 return true; | 486 return true; |
495 } | 487 } |
496 | 488 |
497 void WindowTreeClient::OnEmbedImpl(ui::mojom::WindowTree* window_tree, | 489 void WindowTreeClient::OnEmbedImpl(ui::mojom::WindowTree* window_tree, |
498 ClientSpecificId client_id, | 490 ClientSpecificId client_id, |
499 ui::mojom::WindowDataPtr root_data, | 491 ui::mojom::WindowDataPtr root_data, |
500 int64_t display_id, | 492 int64_t display_id, |
501 Id focused_window_id, | 493 Id focused_window_id, |
502 bool drawn) { | 494 bool drawn) { |
503 // WARNING: this is only called if WindowTreeClient was created as the | 495 // WARNING: this is only called if WindowTreeClient was created as the |
(...skipping 1324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1828 return ScheduleInFlightChange(base::MakeUnique<InFlightCaptureChange>( | 1820 return ScheduleInFlightChange(base::MakeUnique<InFlightCaptureChange>( |
1829 this, capture_synchronizer_.get(), window)); | 1821 this, capture_synchronizer_.get(), window)); |
1830 } | 1822 } |
1831 | 1823 |
1832 uint32_t WindowTreeClient::CreateChangeIdForFocus(WindowMus* window) { | 1824 uint32_t WindowTreeClient::CreateChangeIdForFocus(WindowMus* window) { |
1833 return ScheduleInFlightChange(base::MakeUnique<InFlightFocusChange>( | 1825 return ScheduleInFlightChange(base::MakeUnique<InFlightFocusChange>( |
1834 this, focus_synchronizer_.get(), window)); | 1826 this, focus_synchronizer_.get(), window)); |
1835 } | 1827 } |
1836 | 1828 |
1837 } // namespace aura | 1829 } // namespace aura |
OLD | NEW |