// If |configure_timer_| is started, stops the timer, runs
// ConfigureDisplays(), and returns true; returns false otherwise.
- bool TriggerConfigureTimeout();
+ bool TriggerConfigureTimeout() WARN_UNUSED_RESULT;
private:
DisplayConfigurator* configurator_; // not owned
};
// Flags that can be passed to SetDisplayPower().
- static const int kSetDisplayPowerNoFlags = 0;
+ static const int kSetDisplayPowerNoFlags;
// Configure displays even if the passed-in state matches |power_state_|.
- static const int kSetDisplayPowerForceProbe = 1 << 0;
+ static const int kSetDisplayPowerForceProbe;
// Do not change the state if multiple displays are connected or if the
// only connected display is external.
- static const int kSetDisplayPowerOnlyIfSingleInternalDisplay = 1 << 1;
+ static const int kSetDisplayPowerOnlyIfSingleInternalDisplay;
// Gap between screens so cursor at bottom of active display doesn't
// partially appear on top of inactive display. Higher numbers guard
// suspended.
void ResumeDisplays();
- const std::map<int, float>& GetMirroredDisplayAreaRatioMap() {
- return mirrored_display_area_ratio_map_;
- }
-
// Registers a client for display protection and requests a client id. Returns
// 0 if requesting failed.
ContentProtectionClientId RegisterContentProtectionClient();
typedef std::map<ContentProtectionClientId, ContentProtections>
ProtectionRequests;
- // If |native_display_delegate_| and |touchscreen_delegate_| are not set, then
- // set them to the passed in values.
- void InitializeDelegates(
- scoped_ptr<NativeDisplayDelegate> display_delegate,
- scoped_ptr<TouchscreenDelegate> touchscreen_delegate);
-
// Performs platform specific delegate initialization.
- void PlatformInitialize();
+ scoped_ptr<NativeDisplayDelegate> CreatePlatformNativeDisplayDelegate();
+ scoped_ptr<TouchscreenDelegate> CreatePlatformTouchscreenDelegate();
// Updates |cached_displays_| to contain currently-connected displays. Calls
// |delegate_->GetDisplays()| and then does additional work, like finding the
// Used to enable modes which rely on panel fitting.
bool is_panel_fitting_enabled_;
- // Key of the map is the touch display's id, and the value of the map is the
- // touch display's area ratio in mirror mode defined as :
- // mirror_mode_area / native_mode_area.
- // This is used for scaling touch event's radius when the touch display is in
- // mirror mode :
- // new_touch_radius = sqrt(area_ratio) * old_touch_radius
- std::map<int, float> mirrored_display_area_ratio_map_;
-
// This is detected by the constructor to determine whether or not we should
// be enabled. If we aren't running on ChromeOS, we can't assume that the
// Xrandr X11 extension is supported.
ObserverList<Observer> observers_;
- // The timer to delay configuring displays. See also the comments in
- // Dispatch().
- scoped_ptr<base::OneShotTimer<DisplayConfigurator> > configure_timer_;
+ // The timer to delay configuring displays. This is used to aggregate multiple
+ // display configuration events when they are reported in short time spans.
+ // See comment for NativeDisplayEventDispatcherX11 for more details.
+ base::OneShotTimer<DisplayConfigurator> configure_timer_;
// Id for next display protection client.
ContentProtectionClientId next_display_protection_client_id_;