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

Side by Side Diff: ash/wm/dock/docked_window_layout_manager.cc

Issue 1151133003: Added an ActivationReason parameter to ActivationChangeObserver::OnWindowActivated(...). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Uploaded diff based on dependant CL. Created 5 years, 6 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/wm/dock/docked_window_layout_manager.h ('k') | ash/wm/mru_window_tracker.h » ('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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/wm/dock/docked_window_layout_manager.h" 5 #include "ash/wm/dock/docked_window_layout_manager.h"
6 6
7 #include "ash/screen_util.h" 7 #include "ash/screen_util.h"
8 #include "ash/shelf/shelf.h" 8 #include "ash/shelf/shelf.h"
9 #include "ash/shelf/shelf_constants.h" 9 #include "ash/shelf/shelf_constants.h"
10 #include "ash/shelf/shelf_layout_manager.h" 10 #include "ash/shelf/shelf_layout_manager.h"
(...skipping 884 matching lines...) Expand 10 before | Expand all | Expand 10 after
895 if (window == last_active_window_) 895 if (window == last_active_window_)
896 last_active_window_ = NULL; 896 last_active_window_ = NULL;
897 RecordUmaAction(DOCKED_ACTION_CLOSE, event_source_); 897 RecordUmaAction(DOCKED_ACTION_CLOSE, event_source_);
898 } 898 }
899 899
900 900
901 //////////////////////////////////////////////////////////////////////////////// 901 ////////////////////////////////////////////////////////////////////////////////
902 // DockedWindowLayoutManager, aura::client::ActivationChangeObserver 902 // DockedWindowLayoutManager, aura::client::ActivationChangeObserver
903 // implementation: 903 // implementation:
904 904
905 void DockedWindowLayoutManager::OnWindowActivated(aura::Window* gained_active, 905 void DockedWindowLayoutManager::OnWindowActivated(
906 aura::Window* lost_active) { 906 aura::client::ActivationChangeObserver::ActivationReason reason,
907 aura::Window* gained_active,
908 aura::Window* lost_active) {
907 if (gained_active && IsPopupOrTransient(gained_active)) 909 if (gained_active && IsPopupOrTransient(gained_active))
908 return; 910 return;
909 // Ignore if the window that is not managed by this was activated. 911 // Ignore if the window that is not managed by this was activated.
910 aura::Window* ancestor = NULL; 912 aura::Window* ancestor = NULL;
911 for (aura::Window* parent = gained_active; 913 for (aura::Window* parent = gained_active;
912 parent; parent = parent->parent()) { 914 parent; parent = parent->parent()) {
913 if (parent->parent() == dock_container_) { 915 if (parent->parent() == dock_container_) {
914 ancestor = parent; 916 ancestor = parent;
915 break; 917 break;
916 } 918 }
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
1351 1353
1352 void DockedWindowLayoutManager::OnKeyboardBoundsChanging( 1354 void DockedWindowLayoutManager::OnKeyboardBoundsChanging(
1353 const gfx::Rect& keyboard_bounds) { 1355 const gfx::Rect& keyboard_bounds) {
1354 // This bounds change will have caused a change to the Shelf which does not 1356 // This bounds change will have caused a change to the Shelf which does not
1355 // propagate automatically to this class, so manually recalculate bounds. 1357 // propagate automatically to this class, so manually recalculate bounds.
1356 Relayout(); 1358 Relayout();
1357 UpdateDockBounds(DockedWindowLayoutManagerObserver::KEYBOARD_BOUNDS_CHANGING); 1359 UpdateDockBounds(DockedWindowLayoutManagerObserver::KEYBOARD_BOUNDS_CHANGING);
1358 } 1360 }
1359 1361
1360 } // namespace ash 1362 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/dock/docked_window_layout_manager.h ('k') | ash/wm/mru_window_tracker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698