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

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

Issue 2652713003: aura-mus: Make StackAtTop() proxy to the window manager. (Closed)
Patch Set: Add check to window_manager_delegate_ in WmStackAtTop. 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 | « ui/aura/mus/window_tree_client.h ('k') | no next file » | 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 1492 matching lines...) Expand 10 before | Expand all | Expand 10 after
1503 } 1503 }
1504 1504
1505 if (!window_manager_delegate_->IsWindowActive(window->GetWindow())) { 1505 if (!window_manager_delegate_->IsWindowActive(window->GetWindow())) {
1506 DVLOG(1) << "Non-active window requested deactivation."; 1506 DVLOG(1) << "Non-active window requested deactivation.";
1507 return; 1507 return;
1508 } 1508 }
1509 1509
1510 window_manager_delegate_->OnWmDeactivateWindow(window->GetWindow()); 1510 window_manager_delegate_->OnWmDeactivateWindow(window->GetWindow());
1511 } 1511 }
1512 1512
1513 void WindowTreeClient::WmStackAtTop(uint32_t wm_change_id, uint32_t window_id) {
1514 if (!window_manager_delegate_)
1515 return;
1516
1517 WindowMus* window = GetWindowByServerId(window_id);
1518 if (!window) {
1519 DVLOG(1) << "Attempt to stack at top invalid window " << window_id;
1520 if (window_manager_internal_client_)
1521 window_manager_internal_client_->WmResponse(wm_change_id, false);
1522 return;
1523 }
1524
1525 Window* parent = window->GetWindow()->parent();
1526 parent->StackChildAtTop(window->GetWindow());
1527
1528 if (window_manager_internal_client_)
1529 window_manager_internal_client_->WmResponse(wm_change_id, true);
1530 }
1531
1513 void WindowTreeClient::OnAccelerator(uint32_t ack_id, 1532 void WindowTreeClient::OnAccelerator(uint32_t ack_id,
1514 uint32_t accelerator_id, 1533 uint32_t accelerator_id,
1515 std::unique_ptr<ui::Event> event) { 1534 std::unique_ptr<ui::Event> event) {
1516 DCHECK(event); 1535 DCHECK(event);
1517 const ui::mojom::EventResult result = 1536 const ui::mojom::EventResult result =
1518 window_manager_delegate_->OnAccelerator(accelerator_id, *event.get()); 1537 window_manager_delegate_->OnAccelerator(accelerator_id, *event.get());
1519 if (ack_id && window_manager_internal_client_) 1538 if (ack_id && window_manager_internal_client_)
1520 window_manager_internal_client_->OnAcceleratorAck(ack_id, result); 1539 window_manager_internal_client_->OnAcceleratorAck(ack_id, result);
1521 } 1540 }
1522 1541
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
1751 return ScheduleInFlightChange(base::MakeUnique<InFlightCaptureChange>( 1770 return ScheduleInFlightChange(base::MakeUnique<InFlightCaptureChange>(
1752 this, capture_synchronizer_.get(), window)); 1771 this, capture_synchronizer_.get(), window));
1753 } 1772 }
1754 1773
1755 uint32_t WindowTreeClient::CreateChangeIdForFocus(WindowMus* window) { 1774 uint32_t WindowTreeClient::CreateChangeIdForFocus(WindowMus* window) {
1756 return ScheduleInFlightChange(base::MakeUnique<InFlightFocusChange>( 1775 return ScheduleInFlightChange(base::MakeUnique<InFlightFocusChange>(
1757 this, focus_synchronizer_.get(), window)); 1776 this, focus_synchronizer_.get(), window));
1758 } 1777 }
1759 1778
1760 } // namespace aura 1779 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/mus/window_tree_client.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698