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

Unified Diff: ash/display/display_change_observer_chromeos.h

Issue 2524863003: Move DisplayChangeObserver + tests from ash to ui. (Closed)
Patch Set: Replace with static method. Created 4 years, 1 month 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: 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
deleted file mode 100644
index 8e61ae4ec3b05af6268a937073a356ff341a2349..0000000000000000000000000000000000000000
--- a/ash/display/display_change_observer_chromeos.h
+++ /dev/null
@@ -1,85 +0,0 @@
-// Copyright 2013 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_DISPLAY_CHANGE_OBSERVER_CHROMEOS_H_
-#define ASH_DISPLAY_DISPLAY_CHANGE_OBSERVER_CHROMEOS_H_
-
-#include <stdint.h>
-
-#include <memory>
-#include <vector>
-
-#include "ash/ash_export.h"
-#include "base/macros.h"
-#include "ui/display/chromeos/display_configurator.h"
-#include "ui/display/manager/display_string_provider.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 updates
-// DisplayManager.
-class DisplayChangeObserver : public ui::DisplayConfigurator::StateController,
- public ui::DisplayConfigurator::Observer,
- public ui::InputDeviceEventObserver {
- public:
- // Returns the mode list for internal display.
- ASH_EXPORT static display::ManagedDisplayInfo::ManagedDisplayModeList
- GetInternalManagedDisplayModeList(
- const display::ManagedDisplayInfo& display_info,
- const ui::DisplaySnapshot& output);
-
- // Returns the resolution list.
- ASH_EXPORT static display::ManagedDisplayInfo::ManagedDisplayModeList
- GetExternalManagedDisplayModeList(const ui::DisplaySnapshot& output);
-
- explicit DisplayChangeObserver(
- std::unique_ptr<display::DisplayStringProvider> string_provider);
- ~DisplayChangeObserver() override;
-
- void set_display_manager(display::DisplayManager* display_manager) {
- display_manager_ = display_manager;
- }
-
- void set_display_configurator(ui::DisplayConfigurator* display_configurator) {
- display_configurator_ = display_configurator;
- }
-
- // ui::DisplayConfigurator::StateController overrides:
- ui::MultipleDisplayState GetStateForDisplayIds(
- const ui::DisplayConfigurator::DisplayStateList& outputs) const override;
- bool GetResolutionForDisplayId(int64_t display_id,
- gfx::Size* size) const override;
-
- // Overriden from ui::DisplayConfigurator::Observer:
- void OnDisplayModeChanged(
- const ui::DisplayConfigurator::DisplayStateList& outputs) override;
- void OnDisplayModeChangeFailed(
- const ui::DisplayConfigurator::DisplayStateList& displays,
- ui::MultipleDisplayState failed_new_state) override;
-
- // Overriden from ui::InputDeviceEventObserver:
- void OnTouchscreenDeviceConfigurationChanged() override;
-
- // Exposed for testing.
- ASH_EXPORT static float FindDeviceScaleFactor(float dpi);
-
- private:
- std::unique_ptr<display::DisplayStringProvider> string_provider_;
- display::DisplayManager* display_manager_ = nullptr;
- ui::DisplayConfigurator* display_configurator_ = nullptr;
-
- DISALLOW_COPY_AND_ASSIGN(DisplayChangeObserver);
-};
-
-} // namespace ash
-
-#endif // ASH_DISPLAY_DISPLAY_CHANGE_OBSERVER_CHROMEOS_H_

Powered by Google App Engine
This is Rietveld 408576698