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

Side by Side Diff: chrome/browser/chromeos/arc/boot_phase_monitor/arc_instance_throttle.h

Issue 2624513004: Prioritize ARC instance only when it is needed (Closed)
Patch Set: address comments Created 3 years, 11 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
OLDNEW
(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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698