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

Unified 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: review 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/arc/boot_phase_monitor/arc_instance_throttle.h
diff --git a/chrome/browser/chromeos/arc/boot_phase_monitor/arc_instance_throttle.h b/chrome/browser/chromeos/arc/boot_phase_monitor/arc_instance_throttle.h
new file mode 100644
index 0000000000000000000000000000000000000000..476d75498f250b0b388fc78d44e46fe4d7beee64
--- /dev/null
+++ b/chrome/browser/chromeos/arc/boot_phase_monitor/arc_instance_throttle.h
@@ -0,0 +1,30 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_CHROMEOS_ARC_BOOT_PHASE_MONITOR_ARC_INSTANCE_THROTTLE_H_
+#define CHROME_BROWSER_CHROMEOS_ARC_BOOT_PHASE_MONITOR_ARC_INSTANCE_THROTTLE_H_
+
+#include "ash/common/wm_activation_observer.h"
+#include "base/macros.h"
+
+namespace arc {
+
+// A class that watches window activations and throttle the ARC instance when
Luis Héctor Chávez 2017/01/11 00:07:28 nit: s/throttle/throttles/
Yusuke Sato 2017/01/11 00:31:55 Done.
+// needed.
Luis Héctor Chávez 2017/01/11 00:07:28 maybe expand this comment a bit and mention that A
Yusuke Sato 2017/01/11 00:31:55 Done. Re class name, chatted offline and decided t
+class ArcInstanceThrottle : public ash::WmActivationObserver {
Luis Héctor Chávez 2017/01/11 00:07:28 Maybe "Throttler"? I've seen that Throttle has a d
Luis Héctor Chávez 2017/01/11 00:10:19 Hah, TIL that Throttle is the correct word and we'
+ public:
+ ArcInstanceThrottle();
+ ~ArcInstanceThrottle() override;
+
+ // ash::WmActivationObserver overrides:
+ void OnWindowActivated(ash::WmWindow* gained_active,
+ ash::WmWindow* lost_active) override;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ArcInstanceThrottle);
+};
+
+} // namespace arc
+
+#endif // CHROME_BROWSER_CHROMEOS_ARC_BOOT_PHASE_MONITOR_ARC_INSTANCE_THROTTLE_H_

Powered by Google App Engine
This is Rietveld 408576698