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

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

Issue 2604453002: Fix WindowTreeClient::RequestClose(window_id). (Closed)
Patch Set: remove non-root case Created 3 years, 11 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
« no previous file with comments | « no previous file | ui/aura/mus/window_tree_client_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1296 matching lines...) Expand 10 before | Expand all | Expand 10 after
1307 window_manager_internal_.reset( 1307 window_manager_internal_.reset(
1308 new mojo::AssociatedBinding<ui::mojom::WindowManager>( 1308 new mojo::AssociatedBinding<ui::mojom::WindowManager>(
1309 this, std::move(internal))); 1309 this, std::move(internal)));
1310 } 1310 }
1311 1311
1312 void WindowTreeClient::RequestClose(uint32_t window_id) { 1312 void WindowTreeClient::RequestClose(uint32_t window_id) {
1313 WindowMus* window = GetWindowByServerId(window_id); 1313 WindowMus* window = GetWindowByServerId(window_id);
1314 if (!window || !IsRoot(window)) 1314 if (!window || !IsRoot(window))
1315 return; 1315 return;
1316 1316
1317 window->GetWindow()->delegate()->OnRequestClose(); 1317 // Since the window is the root window, we send close request to the entire
sadrul 2017/01/05 02:49:00 I think WindowDelegate::OnRequestClose() can now b
1318 // WindowTreeHost.
1319 GetWindowTreeHostMus(window->GetWindow())->OnCloseRequest();
1318 } 1320 }
1319 1321
1320 void WindowTreeClient::OnConnect(ClientSpecificId client_id) { 1322 void WindowTreeClient::OnConnect(ClientSpecificId client_id) {
1321 client_id_ = client_id; 1323 client_id_ = client_id;
1322 } 1324 }
1323 1325
1324 void WindowTreeClient::WmNewDisplayAdded(const display::Display& display, 1326 void WindowTreeClient::WmNewDisplayAdded(const display::Display& display,
1325 ui::mojom::WindowDataPtr root_data, 1327 ui::mojom::WindowDataPtr root_data,
1326 bool parent_drawn) { 1328 bool parent_drawn) {
1327 WmNewDisplayAddedImpl(display, std::move(root_data), parent_drawn); 1329 WmNewDisplayAddedImpl(display, std::move(root_data), parent_drawn);
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
1692 return ScheduleInFlightChange(base::MakeUnique<InFlightCaptureChange>( 1694 return ScheduleInFlightChange(base::MakeUnique<InFlightCaptureChange>(
1693 this, capture_synchronizer_.get(), window)); 1695 this, capture_synchronizer_.get(), window));
1694 } 1696 }
1695 1697
1696 uint32_t WindowTreeClient::CreateChangeIdForFocus(WindowMus* window) { 1698 uint32_t WindowTreeClient::CreateChangeIdForFocus(WindowMus* window) {
1697 return ScheduleInFlightChange(base::MakeUnique<InFlightFocusChange>( 1699 return ScheduleInFlightChange(base::MakeUnique<InFlightFocusChange>(
1698 this, focus_synchronizer_.get(), window)); 1700 this, focus_synchronizer_.get(), window));
1699 } 1701 }
1700 1702
1701 } // namespace aura 1703 } // namespace aura
OLDNEW
« no previous file with comments | « no previous file | ui/aura/mus/window_tree_client_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698