diff options
author | dnicoara <dnicoara@chromium.org> | 2014-11-11 13:46:24 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-11-11 21:46:50 +0000 |
commit | 6c87606f32e15bb0f79ff31ab13f05d9d7cbff58 (patch) | |
tree | 5bd0d195534813ffeca414db492dc85ce33a67ff /ash | |
parent | 42f672865028146f7a7d26cad92e8413d72158a9 (diff) | |
download | chromium_src-6c87606f32e15bb0f79ff31ab13f05d9d7cbff58.zip chromium_src-6c87606f32e15bb0f79ff31ab13f05d9d7cbff58.tar.gz chromium_src-6c87606f32e15bb0f79ff31ab13f05d9d7cbff58.tar.bz2 |
[Ozone] Add flag to specify initial display size
This is so Ozone can stop using --ash-host-window-bounds and still
have the display properly sized on boot.
BUG=none
Review URL: https://codereview.chromium.org/707263002
Cr-Commit-Position: refs/heads/master@{#303725}
Diffstat (limited to 'ash')
-rw-r--r-- | ash/display/display_change_observer_chromeos.cc | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/ash/display/display_change_observer_chromeos.cc b/ash/display/display_change_observer_chromeos.cc index 6152004..2573d27 100644 --- a/ash/display/display_change_observer_chromeos.cc +++ b/ash/display/display_change_observer_chromeos.cc @@ -203,9 +203,19 @@ void DisplayChangeObserver::OnDisplayModeChanged( for (size_t i = 0; i < display_states.size(); ++i) { const DisplayConfigurator::DisplayState& state = display_states[i]; - if (state.display->type() == ui::DISPLAY_CONNECTION_TYPE_INTERNAL && - gfx::Display::InternalDisplayId() == gfx::Display::kInvalidDisplayID) { - gfx::Display::SetInternalDisplayId(state.display->display_id()); + if (state.display->type() == ui::DISPLAY_CONNECTION_TYPE_INTERNAL) { + if (gfx::Display::InternalDisplayId() == + gfx::Display::kInvalidDisplayID) { + gfx::Display::SetInternalDisplayId(state.display->display_id()); + } else { +#if defined(USE_OZONE) + // TODO(dnicoara) Remove when Ozone can properly perform the initial + // display configuration. + gfx::Display::SetInternalDisplayId(state.display->display_id()); +#endif + DCHECK_EQ(gfx::Display::InternalDisplayId(), + state.display->display_id()); + } } const ui::DisplayMode* mode_info = state.display->current_mode(); |