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

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

Issue 2745143004: Inform window manager about modal windows in mus+ash. (Closed)
Patch Set: . 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 1378 matching lines...) Expand 10 before | Expand all | Expand 10 after
1389 name, &data); 1389 name, &data);
1390 if (result) { 1390 if (result) {
1391 delegate_->GetPropertyConverter()->SetPropertyFromTransportValue( 1391 delegate_->GetPropertyConverter()->SetPropertyFromTransportValue(
1392 window->GetWindow(), name, data.get()); 1392 window->GetWindow(), name, data.get());
1393 } 1393 }
1394 } 1394 }
1395 if (window_manager_internal_client_) 1395 if (window_manager_internal_client_)
1396 window_manager_internal_client_->WmResponse(change_id, result); 1396 window_manager_internal_client_->WmResponse(change_id, result);
1397 } 1397 }
1398 1398
1399 void WindowTreeClient::WmSetModalType(uint32_t change_id,
1400 Id window_id,
1401 ui::ModalType type) {
1402 WindowMus* window = GetWindowByServerId(window_id);
1403 bool result = false;
1404 if (window) {
1405 DCHECK(window_manager_delegate_);
sky 2017/03/14 21:16:23 I think you should directly set the modal type her
Hadi 2017/03/17 16:16:32 Done.
1406 result =
1407 window_manager_delegate_->OnWmSetModalType(window->GetWindow(), type);
1408 }
1409 if (window_manager_internal_client_)
1410 window_manager_internal_client_->WmResponse(change_id, result);
1411 }
1412
1399 void WindowTreeClient::WmSetCanFocus(Id window_id, bool can_focus) { 1413 void WindowTreeClient::WmSetCanFocus(Id window_id, bool can_focus) {
1400 WindowMus* window = GetWindowByServerId(window_id); 1414 WindowMus* window = GetWindowByServerId(window_id);
1401 if (window) 1415 if (window)
1402 window_manager_delegate_->OnWmSetCanFocus(window->GetWindow(), can_focus); 1416 window_manager_delegate_->OnWmSetCanFocus(window->GetWindow(), can_focus);
1403 } 1417 }
1404 1418
1405 void WindowTreeClient::WmCreateTopLevelWindow( 1419 void WindowTreeClient::WmCreateTopLevelWindow(
1406 uint32_t change_id, 1420 uint32_t change_id,
1407 ClientSpecificId requesting_client_id, 1421 ClientSpecificId requesting_client_id,
1408 const std::unordered_map<std::string, std::vector<uint8_t>>& 1422 const std::unordered_map<std::string, std::vector<uint8_t>>&
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
1823 return ScheduleInFlightChange(base::MakeUnique<InFlightCaptureChange>( 1837 return ScheduleInFlightChange(base::MakeUnique<InFlightCaptureChange>(
1824 this, capture_synchronizer_.get(), window)); 1838 this, capture_synchronizer_.get(), window));
1825 } 1839 }
1826 1840
1827 uint32_t WindowTreeClient::CreateChangeIdForFocus(WindowMus* window) { 1841 uint32_t WindowTreeClient::CreateChangeIdForFocus(WindowMus* window) {
1828 return ScheduleInFlightChange(base::MakeUnique<InFlightFocusChange>( 1842 return ScheduleInFlightChange(base::MakeUnique<InFlightFocusChange>(
1829 this, focus_synchronizer_.get(), window)); 1843 this, focus_synchronizer_.get(), window));
1830 } 1844 }
1831 1845
1832 } // namespace aura 1846 } // namespace aura
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698