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

Side by Side Diff: ash/mus/bridge/wm_shell_mus.cc

Issue 2411913003: Converts ash/wm/mru_window_tracker_unittest.cc to use AshTest (Closed)
Patch Set: comment Created 4 years, 2 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 | « ash/mus/BUILD.gn ('k') | ash/mus/bridge/wm_window_mus.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "ash/mus/bridge/wm_shell_mus.h" 5 #include "ash/mus/bridge/wm_shell_mus.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "ash/common/accelerators/accelerator_controller.h" 9 #include "ash/common/accelerators/accelerator_controller.h"
10 #include "ash/common/key_event_watcher.h" 10 #include "ash/common/key_event_watcher.h"
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 WmWindowMus::Get(window)->GetShellWindowId()); 446 WmWindowMus::Get(window)->GetShellWindowId());
447 } 447 }
448 448
449 // TODO: support OnAttemptToReactivateWindow, http://crbug.com/615114. 449 // TODO: support OnAttemptToReactivateWindow, http://crbug.com/615114.
450 void WmShellMus::OnWindowTreeFocusChanged(ui::Window* gained_focus, 450 void WmShellMus::OnWindowTreeFocusChanged(ui::Window* gained_focus,
451 ui::Window* lost_focus) { 451 ui::Window* lost_focus) {
452 WmWindow* gained_active = GetToplevelAncestor(gained_focus); 452 WmWindow* gained_active = GetToplevelAncestor(gained_focus);
453 if (gained_active) 453 if (gained_active)
454 set_root_window_for_new_windows(gained_active->GetRootWindow()); 454 set_root_window_for_new_windows(gained_active->GetRootWindow());
455 455
456 WmWindow* lost_active = GetToplevelAncestor(gained_focus); 456 WmWindow* lost_active = GetToplevelAncestor(lost_focus);
457 if (gained_active == lost_active) 457 if (gained_active == lost_active)
458 return; 458 return;
459 459
460 FOR_EACH_OBSERVER(WmActivationObserver, activation_observers_, 460 FOR_EACH_OBSERVER(WmActivationObserver, activation_observers_,
461 OnWindowActivated(gained_active, lost_active)); 461 OnWindowActivated(gained_active, lost_active));
462 } 462 }
463 463
464 void WmShellMus::OnDidDestroyClient(ui::WindowTreeClient* client) { 464 void WmShellMus::OnDidDestroyClient(ui::WindowTreeClient* client) {
465 DCHECK_EQ(window_tree_client(), client); 465 DCHECK_EQ(window_tree_client(), client);
466 client->RemoveObserver(this); 466 client->RemoveObserver(this);
467 } 467 }
468 468
469 } // namespace mus 469 } // namespace mus
470 } // namespace ash 470 } // namespace ash
OLDNEW
« no previous file with comments | « ash/mus/BUILD.gn ('k') | ash/mus/bridge/wm_window_mus.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698