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

Unified Diff: ui/display/chromeos/display_configurator.h

Issue 788423002: Add display task to trigger display configuration (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@async-refactor3
Patch Set: . Created 6 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
Index: ui/display/chromeos/display_configurator.h
diff --git a/ui/display/chromeos/display_configurator.h b/ui/display/chromeos/display_configurator.h
index f13d7821d63ed0056a85c7d80704a9c65ce3ee36..5abbccb08ee65314a3f5a0498c6b3bf11a36845a 100644
--- a/ui/display/chromeos/display_configurator.h
+++ b/ui/display/chromeos/display_configurator.h
@@ -16,6 +16,7 @@
#include "base/observer_list.h"
#include "base/timer/timer.h"
#include "third_party/cros_system_api/dbus/service_constants.h"
+#include "ui/display/chromeos/configure_displays_task.h"
#include "ui/display/display_export.h"
#include "ui/display/types/display_constants.h"
#include "ui/display/types/native_display_observer.h"
@@ -94,6 +95,40 @@ class DISPLAY_EXPORT DisplayConfigurator : public NativeDisplayObserver {
virtual bool SoftwareMirroringEnabled() const = 0;
};
+ class DisplayLayoutManager {
+ public:
+ virtual ~DisplayLayoutManager() {}
+
+ virtual SoftwareMirroringController* GetSoftwareMirroringController()
+ const = 0;
+
+ virtual StateController* GetStateController() const = 0;
+
+ // Returns the current display state.
+ virtual MultipleDisplayState GetDisplayState() const = 0;
+
+ // Returns the current power state.
+ virtual chromeos::DisplayPowerState GetPowerState() const = 0;
+
+ // Parses the displays and adds |mirror_mode| and |selected_mode|.
Daniel Erat 2014/12/11 23:34:07 the mirror_mode and selected_mode mentions seem co
+ // TODO(dnicoara): This operation doesn't depend on state and could be done
+ // directly in |GetDisplayLayout()|. Though I need to make sure that there
+ // are no uses for those fields outside DisplayConfigurator.
+ virtual std::vector<DisplayState> ParseDisplays(
+ const std::vector<DisplaySnapshot*>& displays) const = 0;
+
+ // Based on the given |displays|, display state and power state, it will
+ // create display configuration requests which will then be used to
+ // configure the hardware. The requested configuration is stored in
+ // |requests| and |framebuffer_size|.
+ virtual bool GetDisplayLayout(
+ const std::vector<DisplayState>& displays,
+ MultipleDisplayState new_display_state,
+ chromeos::DisplayPowerState new_power_state,
+ std::vector<DisplayConfigureRequest>* requests,
+ gfx::Size* framebuffer_size) const = 0;
+ };
+
// Helper class used by tests.
class TestApi {
public:

Powered by Google App Engine
This is Rietveld 408576698