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

Unified Diff: ash/display/shutdown_observer_chromeos.h

Issue 2523873002: Remove DisplayChangeObserver ash dependencies. (Closed)
Patch Set: Change DCO constructor slightly. Created 4 years 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
« no previous file with comments | « ash/display/display_change_observer_chromeos.cc ('k') | ash/display/shutdown_observer_chromeos.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/display/shutdown_observer_chromeos.h
diff --git a/ash/display/shutdown_observer_chromeos.h b/ash/display/shutdown_observer_chromeos.h
new file mode 100644
index 0000000000000000000000000000000000000000..934b012db6230c1f5af5c39d0fea58a3595ba7f4
--- /dev/null
+++ b/ash/display/shutdown_observer_chromeos.h
@@ -0,0 +1,35 @@
+// Copyright 2016 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 ASH_DISPLAY_SHUTDOWN_OBSERVER_CHROMEOS_H_
+#define ASH_DISPLAY_SHUTDOWN_OBSERVER_CHROMEOS_H_
+
+#include "ash/common/shell_observer.h"
+#include "base/macros.h"
+
+namespace ui {
+class DisplayConfigurator;
+}
+
+namespace ash {
+
+// Adds self as ShellObserver and listens for OnAppTerminating() on behalf of
+// |display_configurator_|.
+class ShutdownObserver : public ShellObserver {
+ public:
+ explicit ShutdownObserver(ui::DisplayConfigurator* display_configurator);
+ ~ShutdownObserver() override;
+
+ private:
+ // ShellObserver:
+ void OnAppTerminating() override;
+
+ ui::DisplayConfigurator* display_configurator_;
+
+ DISALLOW_COPY_AND_ASSIGN(ShutdownObserver);
+};
+
+} // namespace ash
+
+#endif // ASH_DISPLAY_SHUTDOWN_OBSERVER_CHROMEOS_H_
« no previous file with comments | « ash/display/display_change_observer_chromeos.cc ('k') | ash/display/shutdown_observer_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698