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

Side by Side Diff: ash/shell.cc

Issue 11878013: Make ui_controls only usable from interactive_ui_tests. This has two benefits: (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 11 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/ash.gyp ('k') | ash/shell_factory.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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 #include "base/bind.h" 70 #include "base/bind.h"
71 #include "base/command_line.h" 71 #include "base/command_line.h"
72 #include "base/debug/leak_annotations.h" 72 #include "base/debug/leak_annotations.h"
73 #include "ui/aura/client/aura_constants.h" 73 #include "ui/aura/client/aura_constants.h"
74 #include "ui/aura/client/stacking_client.h" 74 #include "ui/aura/client/stacking_client.h"
75 #include "ui/aura/client/user_action_client.h" 75 #include "ui/aura/client/user_action_client.h"
76 #include "ui/aura/env.h" 76 #include "ui/aura/env.h"
77 #include "ui/aura/focus_manager.h" 77 #include "ui/aura/focus_manager.h"
78 #include "ui/aura/layout_manager.h" 78 #include "ui/aura/layout_manager.h"
79 #include "ui/aura/root_window.h" 79 #include "ui/aura/root_window.h"
80 #include "ui/aura/ui_controls_aura.h"
81 #include "ui/aura/window.h" 80 #include "ui/aura/window.h"
82 #include "ui/base/ui_base_switches.h" 81 #include "ui/base/ui_base_switches.h"
83 #include "ui/compositor/layer.h" 82 #include "ui/compositor/layer.h"
84 #include "ui/compositor/layer_animator.h" 83 #include "ui/compositor/layer_animator.h"
85 #include "ui/gfx/display.h" 84 #include "ui/gfx/display.h"
86 #include "ui/gfx/image/image_skia.h" 85 #include "ui/gfx/image/image_skia.h"
87 #include "ui/gfx/screen.h" 86 #include "ui/gfx/screen.h"
88 #include "ui/gfx/size.h" 87 #include "ui/gfx/size.h"
89 #include "ui/ui_controls/ui_controls.h"
90 #include "ui/views/corewm/compound_event_filter.h" 88 #include "ui/views/corewm/compound_event_filter.h"
91 #include "ui/views/corewm/corewm_switches.h" 89 #include "ui/views/corewm/corewm_switches.h"
92 #include "ui/views/corewm/focus_controller.h" 90 #include "ui/views/corewm/focus_controller.h"
93 #include "ui/views/corewm/input_method_event_filter.h" 91 #include "ui/views/corewm/input_method_event_filter.h"
94 #include "ui/views/corewm/shadow_controller.h" 92 #include "ui/views/corewm/shadow_controller.h"
95 #include "ui/views/corewm/visibility_controller.h" 93 #include "ui/views/corewm/visibility_controller.h"
96 #include "ui/views/corewm/window_modality_controller.h" 94 #include "ui/views/corewm/window_modality_controller.h"
97 #include "ui/views/focus/focus_manager_factory.h" 95 #include "ui/views/focus/focus_manager_factory.h"
98 #include "ui/views/widget/native_widget_aura.h" 96 #include "ui/views/widget/native_widget_aura.h"
99 #include "ui/views/widget/widget.h" 97 #include "ui/views/widget/widget.h"
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 new internal::OutputConfiguratorAnimation()), 200 new internal::OutputConfiguratorAnimation()),
203 #endif // defined(OS_CHROMEOS) 201 #endif // defined(OS_CHROMEOS)
204 browser_context_(NULL), 202 browser_context_(NULL),
205 simulate_modal_window_open_for_testing_(false) { 203 simulate_modal_window_open_for_testing_(false) {
206 DCHECK(delegate_.get()); 204 DCHECK(delegate_.get());
207 display_manager_.reset(new internal::DisplayManager); 205 display_manager_.reset(new internal::DisplayManager);
208 ANNOTATE_LEAKING_OBJECT_PTR(screen_); // see crbug.com/156466 206 ANNOTATE_LEAKING_OBJECT_PTR(screen_); // see crbug.com/156466
209 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_ALTERNATE, screen_); 207 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_ALTERNATE, screen_);
210 if (!gfx::Screen::GetScreenByType(gfx::SCREEN_TYPE_NATIVE)) 208 if (!gfx::Screen::GetScreenByType(gfx::SCREEN_TYPE_NATIVE))
211 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, screen_); 209 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, screen_);
212 ui_controls::InstallUIControlsAura(internal::CreateUIControls());
213 #if defined(OS_CHROMEOS) 210 #if defined(OS_CHROMEOS)
214 content::GpuFeatureType blacklisted_features = 211 content::GpuFeatureType blacklisted_features =
215 content::GpuDataManager::GetInstance()->GetBlacklistedFeatures(); 212 content::GpuDataManager::GetInstance()->GetBlacklistedFeatures();
216 bool is_panel_fitting_disabled = 213 bool is_panel_fitting_disabled =
217 (blacklisted_features & content::GPU_FEATURE_TYPE_PANEL_FITTING) || 214 (blacklisted_features & content::GPU_FEATURE_TYPE_PANEL_FITTING) ||
218 CommandLine::ForCurrentProcess()->HasSwitch( 215 CommandLine::ForCurrentProcess()->HasSwitch(
219 switches::kAshDisablePanelFitting); 216 switches::kAshDisablePanelFitting);
220 output_configurator_->Init(!is_panel_fitting_disabled); 217 output_configurator_->Init(!is_panel_fitting_disabled);
221 218
222 output_configurator_->AddObserver(output_configurator_animation_.get()); 219 output_configurator_->AddObserver(output_configurator_animation_.get());
(...skipping 703 matching lines...) Expand 10 before | Expand all | Expand 10 after
926 //////////////////////////////////////////////////////////////////////////////// 923 ////////////////////////////////////////////////////////////////////////////////
927 // Shell, aura::client::ActivationChangeObserver implementation: 924 // Shell, aura::client::ActivationChangeObserver implementation:
928 925
929 void Shell::OnWindowActivated(aura::Window* gained_active, 926 void Shell::OnWindowActivated(aura::Window* gained_active,
930 aura::Window* lost_active) { 927 aura::Window* lost_active) {
931 if (gained_active) 928 if (gained_active)
932 active_root_window_ = gained_active->GetRootWindow(); 929 active_root_window_ = gained_active->GetRootWindow();
933 } 930 }
934 931
935 } // namespace ash 932 } // namespace ash
OLDNEW
« no previous file with comments | « ash/ash.gyp ('k') | ash/shell_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698