class Display;
class Insets;
class Rect;
+class Screen;
}
namespace ash {
class AcceleratorControllerTest;
class DisplayController;
+class ScreenAsh;
namespace test {
class DisplayManagerTestApi;
virtual void CloseNonDesktopDisplay() = 0;
// Called before and after the display configuration changes.
- virtual void PreDisplayConfigurationChange(bool display_removed) = 0;
+ // When |clear_focus| is true, the implementation should
+ // deactivate the active window and set the focus window to NULL.
+ virtual void PreDisplayConfigurationChange(bool clear_focus) = 0;
virtual void PostDisplayConfigurationChange() = 0;
};
return layout_store_.get();
}
+ gfx::Screen* screen() {
+ return screen_;
+ }
+
void set_delegate(Delegate* delegate) { delegate_ = delegate; }
// When set to true, the MonitorManager calls OnDisplayBoundsChanged
const gfx::Insets* overscan_insets,
const gfx::Size& resolution_in_pixels);
- // Returns the display's selected resolution.
- bool GetSelectedResolutionForDisplayId(int64 display_id,
- gfx::Size* resolution_out) const;
+ // Returns the display's selected mode.
+ bool GetSelectedModeForDisplayId(int64 display_id,
+ DisplayMode* mode_out) const;
// Tells if the virtual resolution feature is enabled.
bool IsDisplayUIScalingEnabled() const;
return second_display_mode_ == MIRRORING;
};
+ bool virtual_keyboard_root_window_enabled() const {
+ return second_display_mode_ == VIRTUAL_KEYBOARD;
+ };
+
// Sets/gets second display mode.
void SetSecondDisplayMode(SecondDisplayMode mode);
SecondDisplayMode second_display_mode() const {
// This is used only for bootstrap.
void CreateMirrorWindowIfAny();
+ // Create a screen instance to be used during shutdown.
+ void CreateScreenForShutdown() const;
+
private:
FRIEND_TEST_ALL_PREFIXES(ExtendedDesktopTest, ConvertPoint);
FRIEND_TEST_ALL_PREFIXES(DisplayManagerTest, TestNativeDisplaysChanged);
Delegate* delegate_; // not owned.
+ scoped_ptr<ScreenAsh> screen_ash_;
+ // This is to have an accessor without ScreenAsh definition.
+ gfx::Screen* screen_;
+
scoped_ptr<DisplayLayoutStore> layout_store_;
int64 first_display_id_;
- // List of current active dispays.
+ // List of current active displays.
DisplayList displays_;
int num_connected_displays_;
// The mapping from the display ID to its internal data.
std::map<int64, DisplayInfo> display_info_;
- // Selected resolutions for displays. Key is the displays' ID.
- std::map<int64, gfx::Size> resolutions_;
+ // Selected display modes for displays. Key is the displays' ID.
+ std::map<int64, DisplayMode> display_modes_;
// When set to true, the host window's resize event updates
// the display's size. This is set to true when running on
// desktop environment (for debugging) so that resizing the host
- // window wil update the display properly. This is set to false
+ // window will update the display properly. This is set to false
// on device as well as during the unit tests.
bool change_display_upon_host_resize_;