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

Side by Side Diff: ash/wm/panels/panel_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/panels/panel_layout_manager.h ('k') | ash/wm/workspace/workspace_layout_manager.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/panels/panel_layout_manager.h" 5 #include "ash/wm/panels/panel_layout_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 9
10 #include "ash/screen_util.h" 10 #include "ash/screen_util.h"
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after
506 506
507 if (window_state->IsMinimized()) 507 if (window_state->IsMinimized())
508 MinimizePanel(window_state->window()); 508 MinimizePanel(window_state->window());
509 else 509 else
510 RestorePanel(window_state->window()); 510 RestorePanel(window_state->window());
511 } 511 }
512 512
513 //////////////////////////////////////////////////////////////////////////////// 513 ////////////////////////////////////////////////////////////////////////////////
514 // PanelLayoutManager, aura::client::ActivationChangeObserver implementation: 514 // PanelLayoutManager, aura::client::ActivationChangeObserver implementation:
515 515
516 void PanelLayoutManager::OnWindowActivated(aura::Window* gained_active, 516 void PanelLayoutManager::OnWindowActivated(
517 aura::Window* lost_active) { 517 aura::client::ActivationChangeObserver::ActivationReason reason,
518 aura::Window* gained_active,
519 aura::Window* lost_active) {
518 // Ignore if the panel that is not managed by this was activated. 520 // Ignore if the panel that is not managed by this was activated.
519 if (gained_active && gained_active->type() == ui::wm::WINDOW_TYPE_PANEL && 521 if (gained_active && gained_active->type() == ui::wm::WINDOW_TYPE_PANEL &&
520 gained_active->parent() == panel_container_) { 522 gained_active->parent() == panel_container_) {
521 UpdateStacking(gained_active); 523 UpdateStacking(gained_active);
522 UpdateCallouts(); 524 UpdateCallouts();
523 } 525 }
524 } 526 }
525 527
526 //////////////////////////////////////////////////////////////////////////////// 528 ////////////////////////////////////////////////////////////////////////////////
527 // PanelLayoutManager, DisplayController::Observer implementation: 529 // PanelLayoutManager, DisplayController::Observer implementation:
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
949 // Keyboard hidden, restore original bounds if they exist. 951 // Keyboard hidden, restore original bounds if they exist.
950 SetChildBounds(panel, panel_state->GetRestoreBoundsInScreen()); 952 SetChildBounds(panel, panel_state->GetRestoreBoundsInScreen());
951 } 953 }
952 } 954 }
953 // This bounds change will have caused a change to the Shelf which does not 955 // This bounds change will have caused a change to the Shelf which does not
954 // propogate automatically to this class, so manually recalculate bounds. 956 // propogate automatically to this class, so manually recalculate bounds.
955 OnWindowResized(); 957 OnWindowResized();
956 } 958 }
957 959
958 } // namespace ash 960 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/panels/panel_layout_manager.h ('k') | ash/wm/workspace/workspace_layout_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698