Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(422)

Side by Side Diff: ui/aura/mus/window_tree_client.cc

Issue 2710023007: Make WindowTree::SetModal() take the type. (Closed)
Patch Set: Fix compile error. Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698