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

Unified Diff: ash/display/display_change_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/ash_strings.grd ('k') | ash/display/display_change_observer_chromeos.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/display/display_change_observer_chromeos.h
diff --git a/ash/display/display_change_observer_chromeos.h b/ash/display/display_change_observer_chromeos.h
index 2e447788239c508ac5ca7492133a2a5c85172a36..b7f51f1ae3d05e16347723bd358875dc97419830 100644
--- a/ash/display/display_change_observer_chromeos.h
+++ b/ash/display/display_change_observer_chromeos.h
@@ -7,25 +7,28 @@
#include <stdint.h>
+#include <memory>
#include <vector>
#include "ash/ash_export.h"
-#include "ash/common/shell_observer.h"
#include "base/macros.h"
#include "ui/display/manager/chromeos/display_configurator.h"
#include "ui/display/manager/managed_display_info.h"
#include "ui/events/devices/input_device_event_observer.h"
+namespace display {
+class DisplayManager;
+}
+
namespace ash {
class DisplaySnapshot;
-// An object that observes changes in display configuration and
-// update DisplayManagers.
+// An object that observes changes in display configuration and updates
+// DisplayManager.
class DisplayChangeObserver : public ui::DisplayConfigurator::StateController,
public ui::DisplayConfigurator::Observer,
- public ui::InputDeviceEventObserver,
- public ShellObserver {
+ public ui::InputDeviceEventObserver {
public:
// Returns the mode list for internal display.
ASH_EXPORT static display::ManagedDisplayInfo::ManagedDisplayModeList
@@ -37,7 +40,8 @@ class DisplayChangeObserver : public ui::DisplayConfigurator::StateController,
ASH_EXPORT static display::ManagedDisplayInfo::ManagedDisplayModeList
GetExternalManagedDisplayModeList(const ui::DisplaySnapshot& output);
- DisplayChangeObserver();
+ DisplayChangeObserver(ui::DisplayConfigurator* display_configurator,
+ display::DisplayManager* display_manager);
~DisplayChangeObserver() override;
// ui::DisplayConfigurator::StateController overrides:
@@ -56,13 +60,15 @@ class DisplayChangeObserver : public ui::DisplayConfigurator::StateController,
// Overriden from ui::InputDeviceEventObserver:
void OnTouchscreenDeviceConfigurationChanged() override;
- // Overriden from ShellObserver:
- void OnAppTerminating() override;
-
// Exposed for testing.
ASH_EXPORT static float FindDeviceScaleFactor(float dpi);
private:
+ // Both |display_configurator_| and |display_manager_| are not owned and must
+ // outlive DisplayChangeObserver.
+ ui::DisplayConfigurator* display_configurator_;
+ display::DisplayManager* display_manager_;
+
DISALLOW_COPY_AND_ASSIGN(DisplayChangeObserver);
};
« no previous file with comments | « ash/ash_strings.grd ('k') | ash/display/display_change_observer_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698