summaryrefslogtreecommitdiffstats
path: root/extensions
diff options
context:
space:
mode:
authordnicoara <dnicoara@chromium.org>2015-03-19 09:39:52 -0700
committerCommit bot <commit-bot@chromium.org>2015-03-19 16:40:31 +0000
commit5cc656d7160107491cdebdefd8752ff013f12521 (patch)
treeec9a0c13309893b94ed08ff1b29594cb99aff98f /extensions
parentfd22585c501bdd46f0a511fa5346fc9be1b85f88 (diff)
downloadchromium_src-5cc656d7160107491cdebdefd8752ff013f12521.zip
chromium_src-5cc656d7160107491cdebdefd8752ff013f12521.tar.gz
chromium_src-5cc656d7160107491cdebdefd8752ff013f12521.tar.bz2
Remove DisplayState from the public interface for DisplayConfigurator
The extra fields in DisplayState were only used internally and we don't need to keep track of them. We can simply compute them when performing the display configuration. This is a refactor, no functional change intended. BUG=none Review URL: https://codereview.chromium.org/1019623002 Cr-Commit-Position: refs/heads/master@{#321372}
Diffstat (limited to 'extensions')
-rw-r--r--extensions/shell/browser/shell_desktop_controller_aura.cc6
-rw-r--r--extensions/shell/browser/shell_desktop_controller_aura.h3
2 files changed, 4 insertions, 5 deletions
diff --git a/extensions/shell/browser/shell_desktop_controller_aura.cc b/extensions/shell/browser/shell_desktop_controller_aura.cc
index a3dcd6e..1f45df2 100644
--- a/extensions/shell/browser/shell_desktop_controller_aura.cc
+++ b/extensions/shell/browser/shell_desktop_controller_aura.cc
@@ -236,7 +236,7 @@ void ShellDesktopControllerAura::PowerButtonEventReceived(
}
void ShellDesktopControllerAura::OnDisplayModeChanged(
- const std::vector<ui::DisplayConfigurator::DisplayState>& displays) {
+ const ui::DisplayConfigurator::DisplayStateList& displays) {
gfx::Size size = GetPrimaryDisplaySize();
if (!size.IsEmpty())
host_->UpdateRootWindowSize(size);
@@ -349,11 +349,11 @@ void ShellDesktopControllerAura::DestroyRootWindow() {
gfx::Size ShellDesktopControllerAura::GetPrimaryDisplaySize() {
#if defined(OS_CHROMEOS)
- const std::vector<ui::DisplayConfigurator::DisplayState>& displays =
+ const ui::DisplayConfigurator::DisplayStateList& displays =
display_configurator_->cached_displays();
if (displays.empty())
return gfx::Size();
- const ui::DisplayMode* mode = displays[0].display->current_mode();
+ const ui::DisplayMode* mode = displays[0]->current_mode();
return mode ? mode->size() : gfx::Size();
#else
return gfx::Size();
diff --git a/extensions/shell/browser/shell_desktop_controller_aura.h b/extensions/shell/browser/shell_desktop_controller_aura.h
index 5fcc058..9a8bc1f 100644
--- a/extensions/shell/browser/shell_desktop_controller_aura.h
+++ b/extensions/shell/browser/shell_desktop_controller_aura.h
@@ -87,8 +87,7 @@ class ShellDesktopControllerAura
// ui::DisplayConfigurator::Observer overrides.
void OnDisplayModeChanged(
- const std::vector<ui::DisplayConfigurator::DisplayState>& displays)
- override;
+ const ui::DisplayConfigurator::DisplayStateList& displays) override;
#endif
// aura::WindowTreeHostObserver overrides: