| OLD | NEW |
| 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/shell.h" | 5 #include "ash/shell.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "ash/accelerators/accelerator_controller.h" | 10 #include "ash/accelerators/accelerator_controller.h" |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 namespace { | 148 namespace { |
| 149 | 149 |
| 150 using aura::Window; | 150 using aura::Window; |
| 151 using views::Widget; | 151 using views::Widget; |
| 152 | 152 |
| 153 // A Corewm VisibilityController subclass that calls the Ash animation routine | 153 // A Corewm VisibilityController subclass that calls the Ash animation routine |
| 154 // so we can pick up our extended animations. See ash/wm/window_animations.h. | 154 // so we can pick up our extended animations. See ash/wm/window_animations.h. |
| 155 class AshVisibilityController : public ::wm::VisibilityController { | 155 class AshVisibilityController : public ::wm::VisibilityController { |
| 156 public: | 156 public: |
| 157 AshVisibilityController() {} | 157 AshVisibilityController() {} |
| 158 virtual ~AshVisibilityController() {} | 158 ~AshVisibilityController() override {} |
| 159 | 159 |
| 160 private: | 160 private: |
| 161 // Overridden from ::wm::VisibilityController: | 161 // Overridden from ::wm::VisibilityController: |
| 162 virtual bool CallAnimateOnChildWindowVisibilityChanged( | 162 bool CallAnimateOnChildWindowVisibilityChanged(aura::Window* window, |
| 163 aura::Window* window, | 163 bool visible) override { |
| 164 bool visible) override { | |
| 165 return AnimateOnChildWindowVisibilityChanged(window, visible); | 164 return AnimateOnChildWindowVisibilityChanged(window, visible); |
| 166 } | 165 } |
| 167 | 166 |
| 168 DISALLOW_COPY_AND_ASSIGN(AshVisibilityController); | 167 DISALLOW_COPY_AND_ASSIGN(AshVisibilityController); |
| 169 }; | 168 }; |
| 170 | 169 |
| 171 AshWindowTreeHostInitParams ShellInitParamsToAshWindowTreeHostInitParams( | 170 AshWindowTreeHostInitParams ShellInitParamsToAshWindowTreeHostInitParams( |
| 172 const ShellInitParams& shell_init_params) { | 171 const ShellInitParams& shell_init_params) { |
| 173 AshWindowTreeHostInitParams ash_init_params; | 172 AshWindowTreeHostInitParams ash_init_params; |
| 174 #if defined(OS_WIN) | 173 #if defined(OS_WIN) |
| (...skipping 984 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1159 //////////////////////////////////////////////////////////////////////////////// | 1158 //////////////////////////////////////////////////////////////////////////////// |
| 1160 // Shell, aura::client::ActivationChangeObserver implementation: | 1159 // Shell, aura::client::ActivationChangeObserver implementation: |
| 1161 | 1160 |
| 1162 void Shell::OnWindowActivated(aura::Window* gained_active, | 1161 void Shell::OnWindowActivated(aura::Window* gained_active, |
| 1163 aura::Window* lost_active) { | 1162 aura::Window* lost_active) { |
| 1164 if (gained_active) | 1163 if (gained_active) |
| 1165 target_root_window_ = gained_active->GetRootWindow(); | 1164 target_root_window_ = gained_active->GetRootWindow(); |
| 1166 } | 1165 } |
| 1167 | 1166 |
| 1168 } // namespace ash | 1167 } // namespace ash |
| OLD | NEW |