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

Side by Side Diff: ash/shell.cc

Issue 15745014: Move GPU device/driver info related code from content to gpu. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: rebase Created 7 years, 7 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/DEPS ('k') | chrome/browser/component_updater/swiftshader_component_installer.cc » ('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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 #if defined(OS_CHROMEOS) && defined(USE_X11) 111 #if defined(OS_CHROMEOS) && defined(USE_X11)
112 #include "ash/ash_constants.h" 112 #include "ash/ash_constants.h"
113 #include "ash/display/display_change_observer_x11.h" 113 #include "ash/display/display_change_observer_x11.h"
114 #include "ash/display/display_error_dialog.h" 114 #include "ash/display/display_error_dialog.h"
115 #include "ash/display/output_configurator_animation.h" 115 #include "ash/display/output_configurator_animation.h"
116 #include "base/chromeos/chromeos_version.h" 116 #include "base/chromeos/chromeos_version.h"
117 #include "base/message_pump_aurax11.h" 117 #include "base/message_pump_aurax11.h"
118 #include "chromeos/display/output_configurator.h" 118 #include "chromeos/display/output_configurator.h"
119 #include "content/public/browser/gpu_data_manager.h" 119 #include "content/public/browser/gpu_data_manager.h"
120 #include "content/public/common/content_switches.h" 120 #include "content/public/common/content_switches.h"
121 #include "content/public/common/gpu_feature_type.h" 121 #include "gpu/config/gpu_feature_type.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 {
127 127
128 using aura::Window; 128 using aura::Window;
129 using views::Widget; 129 using views::Widget;
130 130
131 // This dummy class is used for shell unit tests. We dont have chrome delegate 131 // This dummy class is used for shell unit tests. We dont have chrome delegate
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 DCHECK(delegate_.get()); 213 DCHECK(delegate_.get());
214 display_manager_.reset(new internal::DisplayManager); 214 display_manager_.reset(new internal::DisplayManager);
215 ANNOTATE_LEAKING_OBJECT_PTR(screen_); // see crbug.com/156466 215 ANNOTATE_LEAKING_OBJECT_PTR(screen_); // see crbug.com/156466
216 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_ALTERNATE, screen_); 216 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_ALTERNATE, screen_);
217 if (!gfx::Screen::GetScreenByType(gfx::SCREEN_TYPE_NATIVE)) 217 if (!gfx::Screen::GetScreenByType(gfx::SCREEN_TYPE_NATIVE))
218 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, screen_); 218 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, screen_);
219 display_controller_.reset(new DisplayController); 219 display_controller_.reset(new DisplayController);
220 #if defined(OS_CHROMEOS) && defined(USE_X11) 220 #if defined(OS_CHROMEOS) && defined(USE_X11)
221 bool is_panel_fitting_disabled = 221 bool is_panel_fitting_disabled =
222 content::GpuDataManager::GetInstance()->IsFeatureBlacklisted( 222 content::GpuDataManager::GetInstance()->IsFeatureBlacklisted(
223 content::GPU_FEATURE_TYPE_PANEL_FITTING) || 223 gpu::GPU_FEATURE_TYPE_PANEL_FITTING) ||
224 CommandLine::ForCurrentProcess()->HasSwitch( 224 CommandLine::ForCurrentProcess()->HasSwitch(
225 ::switches::kDisablePanelFitting); 225 ::switches::kDisablePanelFitting);
226 226
227 output_configurator_->Init( 227 output_configurator_->Init(
228 !is_panel_fitting_disabled, 228 !is_panel_fitting_disabled,
229 delegate_->IsFirstRunAfterBoot() ? kChromeOsBootColor : 0); 229 delegate_->IsFirstRunAfterBoot() ? kChromeOsBootColor : 0);
230 230
231 base::MessagePumpAuraX11::Current()->AddDispatcherForRootWindow( 231 base::MessagePumpAuraX11::Current()->AddDispatcherForRootWindow(
232 output_configurator()); 232 output_configurator());
233 #endif // defined(OS_CHROMEOS) 233 #endif // defined(OS_CHROMEOS)
(...skipping 718 matching lines...) Expand 10 before | Expand all | Expand 10 after
952 //////////////////////////////////////////////////////////////////////////////// 952 ////////////////////////////////////////////////////////////////////////////////
953 // Shell, aura::client::ActivationChangeObserver implementation: 953 // Shell, aura::client::ActivationChangeObserver implementation:
954 954
955 void Shell::OnWindowActivated(aura::Window* gained_active, 955 void Shell::OnWindowActivated(aura::Window* gained_active,
956 aura::Window* lost_active) { 956 aura::Window* lost_active) {
957 if (gained_active) 957 if (gained_active)
958 active_root_window_ = gained_active->GetRootWindow(); 958 active_root_window_ = gained_active->GetRootWindow();
959 } 959 }
960 960
961 } // namespace ash 961 } // namespace ash
OLDNEW
« no previous file with comments | « ash/DEPS ('k') | chrome/browser/component_updater/swiftshader_component_installer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698