OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_CHROMEOS_ARC_BOOT_PHASE_MONITOR_ARC_INSTANCE_THROTTLE_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_ARC_BOOT_PHASE_MONITOR_ARC_INSTANCE_THROTTLE_H_ |
| 7 |
| 8 #include "ash/common/wm_activation_observer.h" |
| 9 #include "base/macros.h" |
| 10 |
| 11 namespace arc { |
| 12 |
| 13 // A class that watches window activations and prioritizes the ARC instance when |
| 14 // one of ARC windows is activated. The class also unprioritizes the instance |
| 15 // when non-ARC window such as Chrome is activated. |
| 16 class ArcInstanceThrottle : public ash::WmActivationObserver { |
| 17 public: |
| 18 ArcInstanceThrottle(); |
| 19 ~ArcInstanceThrottle() override; |
| 20 |
| 21 // ash::WmActivationObserver overrides: |
| 22 void OnWindowActivated(ash::WmWindow* gained_active, |
| 23 ash::WmWindow* lost_active) override; |
| 24 |
| 25 private: |
| 26 DISALLOW_COPY_AND_ASSIGN(ArcInstanceThrottle); |
| 27 }; |
| 28 |
| 29 } // namespace arc |
| 30 |
| 31 #endif // CHROME_BROWSER_CHROMEOS_ARC_BOOT_PHASE_MONITOR_ARC_INSTANCE_THROTTLE_
H_ |
OLD | NEW |