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

Side by Side Diff: ash/shell.cc

Issue 23904025: Move IsRunningOnChromeOS to SysInfo (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 3 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
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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 #include "ui/views/focus/focus_manager_factory.h" 105 #include "ui/views/focus/focus_manager_factory.h"
106 #include "ui/views/widget/native_widget_aura.h" 106 #include "ui/views/widget/native_widget_aura.h"
107 #include "ui/views/widget/widget.h" 107 #include "ui/views/widget/widget.h"
108 108
109 #if defined(OS_CHROMEOS) 109 #if defined(OS_CHROMEOS)
110 #if defined(USE_X11) 110 #if defined(USE_X11)
111 #include "ash/ash_constants.h" 111 #include "ash/ash_constants.h"
112 #include "ash/display/display_change_observer_chromeos.h" 112 #include "ash/display/display_change_observer_chromeos.h"
113 #include "ash/display/display_error_observer_chromeos.h" 113 #include "ash/display/display_error_observer_chromeos.h"
114 #include "ash/display/output_configurator_animation.h" 114 #include "ash/display/output_configurator_animation.h"
115 #include "base/chromeos/chromeos_version.h"
116 #include "base/message_loop/message_pump_x11.h" 115 #include "base/message_loop/message_pump_x11.h"
116 #include "base/sys_info.h"
117 #include "chromeos/display/output_configurator.h" 117 #include "chromeos/display/output_configurator.h"
118 #include "content/public/browser/gpu_data_manager.h" 118 #include "content/public/browser/gpu_data_manager.h"
119 #include "gpu/config/gpu_feature_type.h" 119 #include "gpu/config/gpu_feature_type.h"
120 #endif // defined(USE_X11) 120 #endif // defined(USE_X11)
121 #include "ash/system/chromeos/power/power_status.h" 121 #include "ash/system/chromeos/power/power_status.h"
122 #endif // defined(OS_CHROMEOS) 122 #endif // defined(OS_CHROMEOS)
123 123
124 namespace ash { 124 namespace ash {
125 125
126 namespace { 126 namespace {
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 437
438 void Shell::Init() { 438 void Shell::Init() {
439 CommandLine* command_line = CommandLine::ForCurrentProcess(); 439 CommandLine* command_line = CommandLine::ForCurrentProcess();
440 440
441 delegate_->PreInit(); 441 delegate_->PreInit();
442 bool display_initialized = false; 442 bool display_initialized = false;
443 #if defined(OS_CHROMEOS) && defined(USE_X11) 443 #if defined(OS_CHROMEOS) && defined(USE_X11)
444 output_configurator_animation_.reset( 444 output_configurator_animation_.reset(
445 new internal::OutputConfiguratorAnimation()); 445 new internal::OutputConfiguratorAnimation());
446 output_configurator_->AddObserver(output_configurator_animation_.get()); 446 output_configurator_->AddObserver(output_configurator_animation_.get());
447 if (base::chromeos::IsRunningOnChromeOS()) { 447 if (base::SysInfo::IsRunningOnChromeOS()) {
448 display_change_observer_.reset(new internal::DisplayChangeObserver); 448 display_change_observer_.reset(new internal::DisplayChangeObserver);
449 // Register |display_change_observer_| first so that the rest of 449 // Register |display_change_observer_| first so that the rest of
450 // observer gets invoked after the root windows are configured. 450 // observer gets invoked after the root windows are configured.
451 output_configurator_->AddObserver(display_change_observer_.get()); 451 output_configurator_->AddObserver(display_change_observer_.get());
452 display_error_observer_.reset(new internal::DisplayErrorObserver()); 452 display_error_observer_.reset(new internal::DisplayErrorObserver());
453 output_configurator_->AddObserver(display_error_observer_.get()); 453 output_configurator_->AddObserver(display_error_observer_.get());
454 output_configurator_->set_state_controller(display_change_observer_.get()); 454 output_configurator_->set_state_controller(display_change_observer_.get());
455 if (!command_line->HasSwitch(ash::switches::kAshDisableSoftwareMirroring)) 455 if (!command_line->HasSwitch(ash::switches::kAshDisableSoftwareMirroring))
456 output_configurator_->set_mirroring_controller(display_manager_.get()); 456 output_configurator_->set_mirroring_controller(display_manager_.get());
457 output_configurator_->Start( 457 output_configurator_->Start(
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after
963 //////////////////////////////////////////////////////////////////////////////// 963 ////////////////////////////////////////////////////////////////////////////////
964 // Shell, aura::client::ActivationChangeObserver implementation: 964 // Shell, aura::client::ActivationChangeObserver implementation:
965 965
966 void Shell::OnWindowActivated(aura::Window* gained_active, 966 void Shell::OnWindowActivated(aura::Window* gained_active,
967 aura::Window* lost_active) { 967 aura::Window* lost_active) {
968 if (gained_active) 968 if (gained_active)
969 target_root_window_ = gained_active->GetRootWindow(); 969 target_root_window_ = gained_active->GetRootWindow();
970 } 970 }
971 971
972 } // namespace ash 972 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698