Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(752)

Side by Side Diff: ash/shell.cc

Issue 1107733006: Unified Desktop: hook up ash to allow unified desktop mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/shell.h" 5 #include "ash/shell.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "ash/accelerators/accelerator_controller.h" 10 #include "ash/accelerators/accelerator_controller.h"
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 void Shell::AddShellObserver(ShellObserver* observer) { 478 void Shell::AddShellObserver(ShellObserver* observer) {
479 observers_.AddObserver(observer); 479 observers_.AddObserver(observer);
480 } 480 }
481 481
482 void Shell::RemoveShellObserver(ShellObserver* observer) { 482 void Shell::RemoveShellObserver(ShellObserver* observer) {
483 observers_.RemoveObserver(observer); 483 observers_.RemoveObserver(observer);
484 } 484 }
485 485
486 #if defined(OS_CHROMEOS) 486 #if defined(OS_CHROMEOS)
487 bool Shell::ShouldSaveDisplaySettings() { 487 bool Shell::ShouldSaveDisplaySettings() {
488 // TODO(oshima): Allow saving the settings even in unified desktop mode.
488 return !(screen_orientation_controller_ 489 return !(screen_orientation_controller_
489 ->ignore_display_configuration_updates() || 490 ->ignore_display_configuration_updates() ||
490 resolution_notification_controller_->DoesNotificationTimeout()); 491 resolution_notification_controller_->DoesNotificationTimeout()) &&
492 !switches::UnifiedDesktopEnabled();
491 } 493 }
492 #endif 494 #endif
493 495
494 void Shell::UpdateShelfVisibility() { 496 void Shell::UpdateShelfVisibility() {
495 RootWindowControllerList controllers = GetAllRootWindowControllers(); 497 RootWindowControllerList controllers = GetAllRootWindowControllers();
496 for (RootWindowControllerList::iterator iter = controllers.begin(); 498 for (RootWindowControllerList::iterator iter = controllers.begin();
497 iter != controllers.end(); ++iter) 499 iter != controllers.end(); ++iter)
498 if ((*iter)->shelf()) 500 if ((*iter)->shelf())
499 (*iter)->UpdateShelfVisibility(); 501 (*iter)->UpdateShelfVisibility();
500 } 502 }
(...skipping 667 matching lines...) Expand 10 before | Expand all | Expand 10 after
1168 //////////////////////////////////////////////////////////////////////////////// 1170 ////////////////////////////////////////////////////////////////////////////////
1169 // Shell, aura::client::ActivationChangeObserver implementation: 1171 // Shell, aura::client::ActivationChangeObserver implementation:
1170 1172
1171 void Shell::OnWindowActivated(aura::Window* gained_active, 1173 void Shell::OnWindowActivated(aura::Window* gained_active,
1172 aura::Window* lost_active) { 1174 aura::Window* lost_active) {
1173 if (gained_active) 1175 if (gained_active)
1174 target_root_window_ = gained_active->GetRootWindow(); 1176 target_root_window_ = gained_active->GetRootWindow();
1175 } 1177 }
1176 1178
1177 } // namespace ash 1179 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698