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

Side by Side Diff: ash/shell.cc

Issue 10909242: Add "panel_fitting" GPU feature type and use it for mirror mode. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Reorganized code per oshima's suggestion. Created 8 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
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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 #if !defined(OS_MACOSX) 93 #if !defined(OS_MACOSX)
94 #include "ash/accelerators/accelerator_controller.h" 94 #include "ash/accelerators/accelerator_controller.h"
95 #include "ash/accelerators/accelerator_filter.h" 95 #include "ash/accelerators/accelerator_filter.h"
96 #include "ash/accelerators/nested_dispatcher_controller.h" 96 #include "ash/accelerators/nested_dispatcher_controller.h"
97 #endif 97 #endif
98 98
99 #if defined(OS_CHROMEOS) 99 #if defined(OS_CHROMEOS)
100 #include "ash/display/output_configurator_animation.h" 100 #include "ash/display/output_configurator_animation.h"
101 #include "base/message_pump_aurax11.h" 101 #include "base/message_pump_aurax11.h"
102 #include "chromeos/display/output_configurator.h" 102 #include "chromeos/display/output_configurator.h"
103 #include "content/public/common/content_switches.h"
104 #include "content/public/browser/gpu_data_manager.h"
103 #endif // defined(OS_CHROMEOS) 105 #endif // defined(OS_CHROMEOS)
104 106
105 namespace ash { 107 namespace ash {
106 108
107 namespace { 109 namespace {
108 110
109 using aura::Window; 111 using aura::Window;
110 using views::Widget; 112 using views::Widget;
111 113
112 // This dummy class is used for shell unit tests. We dont have chrome delegate 114 // This dummy class is used for shell unit tests. We dont have chrome delegate
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 output_configurator_animation_( 188 output_configurator_animation_(
187 new internal::OutputConfiguratorAnimation()), 189 new internal::OutputConfiguratorAnimation()),
188 #endif // defined(OS_CHROMEOS) 190 #endif // defined(OS_CHROMEOS)
189 shelf_(NULL), 191 shelf_(NULL),
190 panel_layout_manager_(NULL), 192 panel_layout_manager_(NULL),
191 status_area_widget_(NULL), 193 status_area_widget_(NULL),
192 browser_context_(NULL) { 194 browser_context_(NULL) {
193 gfx::Screen::SetInstance(screen_); 195 gfx::Screen::SetInstance(screen_);
194 ui_controls::InstallUIControlsAura(internal::CreateUIControls()); 196 ui_controls::InstallUIControlsAura(internal::CreateUIControls());
195 #if defined(OS_CHROMEOS) 197 #if defined(OS_CHROMEOS)
198 bool is_panel_fitting_disabled =
199 (content::GpuDataManager::GetInstance()->GetBlacklistedFeatures() &
cwolfe 2012/09/18 13:27:47 I'd find this clearer if (as elsewhere in the code
ynovikov 2012/09/21 18:48:27 Done.
200 content::GPU_FEATURE_TYPE_PANEL_FITTING) ||
201 CommandLine::ForCurrentProcess()->HasSwitch(
202 ::switches::kDisablePanelFitting);
203 output_configurator_->Init(!is_panel_fitting_disabled);
204
196 output_configurator_->AddObserver(output_configurator_animation_.get()); 205 output_configurator_->AddObserver(output_configurator_animation_.get());
197 base::MessagePumpAuraX11::Current()->AddDispatcherForRootWindow( 206 base::MessagePumpAuraX11::Current()->AddDispatcherForRootWindow(
198 output_configurator()); 207 output_configurator());
199 static_cast<internal::MultiDisplayManager*>( 208 static_cast<internal::MultiDisplayManager*>(
200 aura::Env::GetInstance()->display_manager())->InitInternalDisplayInfo(); 209 aura::Env::GetInstance()->display_manager())->InitInternalDisplayInfo();
201 #endif // defined(OS_CHROMEOS) 210 #endif // defined(OS_CHROMEOS)
202 } 211 }
203 212
204 Shell::~Shell() { 213 Shell::~Shell() {
205 views::FocusManagerFactory::Install(NULL); 214 views::FocusManagerFactory::Install(NULL);
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after
756 } 765 }
757 766
758 void Shell::ShowCursor(bool visible) { 767 void Shell::ShowCursor(bool visible) {
759 RootWindowList root_windows = GetAllRootWindows(); 768 RootWindowList root_windows = GetAllRootWindows();
760 for (RootWindowList::iterator iter = root_windows.begin(); 769 for (RootWindowList::iterator iter = root_windows.begin();
761 iter != root_windows.end(); ++iter) 770 iter != root_windows.end(); ++iter)
762 (*iter)->ShowCursor(visible); 771 (*iter)->ShowCursor(visible);
763 } 772 }
764 773
765 } // namespace ash 774 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/login_utils.cc » ('j') | chrome/browser/resources/software_rendering_list.json » ('J')

Powered by Google App Engine
This is Rietveld 408576698