summaryrefslogtreecommitdiffstats
path: root/ash/test/shell_test_api.cc
diff options
context:
space:
mode:
authoroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-21 06:42:39 +0000
committeroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-21 06:42:39 +0000
commit945ece96bfd8a4d239f967d329bfd6a102659c66 (patch)
tree2e74c8a932f04cd833bd5d439ef225d4ec63d4db /ash/test/shell_test_api.cc
parentea367c52cfaf6bfa3e96caa61de556471cbd08c9 (diff)
downloadchromium_src-945ece96bfd8a4d239f967d329bfd6a102659c66.zip
chromium_src-945ece96bfd8a4d239f967d329bfd6a102659c66.tar.gz
chromium_src-945ece96bfd8a4d239f967d329bfd6a102659c66.tar.bz2
Refactor DisplayPreference
- Use ash::DisplayController::Observer to save preference - DisplayLayout::FromInets to eliminate conversions - Create OutputConfiguratorAnimation on desktop, except for test. This is necessary to get options page working on desktop. - Store default only when a user modified the layout. I think this matches the user's expectation better. Other cleanups: - Removed unused declaration Shell::InitLayoutManagersForPrimaryDisplay BUG=196818 TEST=covered by test Review URL: https://codereview.chromium.org/12843008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@189538 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/test/shell_test_api.cc')
-rw-r--r--ash/test/shell_test_api.cc15
1 files changed, 15 insertions, 0 deletions
diff --git a/ash/test/shell_test_api.cc b/ash/test/shell_test_api.cc
index f4ba794..72b869a 100644
--- a/ash/test/shell_test_api.cc
+++ b/ash/test/shell_test_api.cc
@@ -7,6 +7,11 @@
#include "ash/root_window_controller.h"
#include "ash/shell.h"
+#if defined(OS_CHROMEOS)
+#include "ash/display/output_configurator_animation.h"
+#include "chromeos/display/output_configurator.h"
+#endif
+
namespace ash {
namespace test {
@@ -43,5 +48,15 @@ LauncherModel* ShellTestApi::launcher_model() {
return shell_->launcher_model_.get();
}
+void ShellTestApi::DisableOutputConfiguratorAnimation() {
+#if defined(OS_CHROMEOS)
+ if (shell_->output_configurator_animation_.get()) {
+ shell_->output_configurator_->RemoveObserver(
+ shell_->output_configurator_animation_.get());
+ shell_->output_configurator_animation_.reset();
+ }
+#endif // defined(OS_CHROMEOS)
+}
+
} // namespace test
} // namespace ash