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

Side by Side Diff: ash/shell.cc

Issue 12505005: Store rotation/ui scale to local state. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « ash/display/display_manager.cc ('k') | ash/shell/shell_delegate_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/focus_manager_factory.h" 10 #include "ash/accelerators/focus_manager_factory.h"
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 return containers; 410 return containers;
411 } 411 }
412 412
413 // static 413 // static
414 bool Shell::IsLauncherPerDisplayEnabled() { 414 bool Shell::IsLauncherPerDisplayEnabled() {
415 CommandLine* command_line = CommandLine::ForCurrentProcess(); 415 CommandLine* command_line = CommandLine::ForCurrentProcess();
416 return !command_line->HasSwitch(switches::kAshDisableLauncherPerDisplay); 416 return !command_line->HasSwitch(switches::kAshDisableLauncherPerDisplay);
417 } 417 }
418 418
419 void Shell::Init() { 419 void Shell::Init() {
420 delegate_->OnPreInit();
420 #if defined(OS_CHROMEOS) 421 #if defined(OS_CHROMEOS)
421 output_configurator_animation_.reset( 422 output_configurator_animation_.reset(
422 new internal::OutputConfiguratorAnimation()); 423 new internal::OutputConfiguratorAnimation());
423 output_configurator_->AddObserver(output_configurator_animation_.get()); 424 output_configurator_->AddObserver(output_configurator_animation_.get());
424 if (base::chromeos::IsRunningOnChromeOS()) { 425 if (base::chromeos::IsRunningOnChromeOS()) {
425 display_change_observer_.reset(new internal::DisplayChangeObserverX11); 426 display_change_observer_.reset(new internal::DisplayChangeObserverX11);
426 // Register |display_change_observer_| first so that the rest of 427 // Register |display_change_observer_| first so that the rest of
427 // observer gets invoked after the root windows are configured. 428 // observer gets invoked after the root windows are configured.
428 output_configurator_->AddObserver(display_change_observer_.get()); 429 output_configurator_->AddObserver(display_change_observer_.get());
429 display_error_observer_.reset(new internal::DisplayErrorObserver()); 430 display_error_observer_.reset(new internal::DisplayErrorObserver());
431 output_configurator_->set_delegate(display_change_observer_.get());
430 output_configurator_->AddObserver(display_error_observer_.get()); 432 output_configurator_->AddObserver(display_error_observer_.get());
431 display_change_observer_->OnDisplayModeChanged(); 433 display_change_observer_->OnDisplayModeChanged();
432 } 434 }
433 #endif 435 #endif
434 436
435 // Install the custom factory first so that views::FocusManagers for Tray, 437 // Install the custom factory first so that views::FocusManagers for Tray,
436 // Launcher, and WallPaper could be created by the factory. 438 // Launcher, and WallPaper could be created by the factory.
437 views::FocusManagerFactory::Install(new AshFocusManagerFactory); 439 views::FocusManagerFactory::Install(new AshFocusManagerFactory);
438 440
439 env_filter_.reset(new views::corewm::CompoundEventFilter); 441 env_filter_.reset(new views::corewm::CompoundEventFilter);
(...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after
949 //////////////////////////////////////////////////////////////////////////////// 951 ////////////////////////////////////////////////////////////////////////////////
950 // Shell, aura::client::ActivationChangeObserver implementation: 952 // Shell, aura::client::ActivationChangeObserver implementation:
951 953
952 void Shell::OnWindowActivated(aura::Window* gained_active, 954 void Shell::OnWindowActivated(aura::Window* gained_active,
953 aura::Window* lost_active) { 955 aura::Window* lost_active) {
954 if (gained_active) 956 if (gained_active)
955 active_root_window_ = gained_active->GetRootWindow(); 957 active_root_window_ = gained_active->GetRootWindow();
956 } 958 }
957 959
958 } // namespace ash 960 } // namespace ash
OLDNEW
« no previous file with comments | « ash/display/display_manager.cc ('k') | ash/shell/shell_delegate_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698