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

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: Remove include in favour of forward declare 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
« no previous file with comments | « ui/display/BUILD.gn ('k') | ui/display/chromeos/display_configurator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..cfef0bdb620f0114f9f4d2f43a7c5f579aacccfd 100644
--- a/ui/display/chromeos/display_configurator.h
+++ b/ui/display/chromeos/display_configurator.h
@@ -27,6 +27,7 @@ class Size;
}
namespace ui {
+struct DisplayConfigureRequest;
class DisplayMode;
class DisplaySnapshot;
class NativeDisplayDelegate;
@@ -94,6 +95,41 @@ 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| into a list of DisplayStates. This effectively adds
+ // |mirror_mode| and |selected_mode| to the returned results.
+ // 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:
« no previous file with comments | « ui/display/BUILD.gn ('k') | ui/display/chromeos/display_configurator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698