Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 68 #include "base/bind.h" | 68 #include "base/bind.h" |
| 69 #include "base/command_line.h" | 69 #include "base/command_line.h" |
| 70 #include "base/debug/leak_annotations.h" | 70 #include "base/debug/leak_annotations.h" |
| 71 #include "ui/aura/client/aura_constants.h" | 71 #include "ui/aura/client/aura_constants.h" |
| 72 #include "ui/aura/client/stacking_client.h" | 72 #include "ui/aura/client/stacking_client.h" |
| 73 #include "ui/aura/client/user_action_client.h" | 73 #include "ui/aura/client/user_action_client.h" |
| 74 #include "ui/aura/env.h" | 74 #include "ui/aura/env.h" |
| 75 #include "ui/aura/focus_manager.h" | 75 #include "ui/aura/focus_manager.h" |
| 76 #include "ui/aura/layout_manager.h" | 76 #include "ui/aura/layout_manager.h" |
| 77 #include "ui/aura/root_window.h" | 77 #include "ui/aura/root_window.h" |
| 78 #include "ui/aura/ui_controls_aura.h" | |
| 79 #include "ui/aura/window.h" | 78 #include "ui/aura/window.h" |
| 80 #include "ui/compositor/layer.h" | 79 #include "ui/compositor/layer.h" |
| 81 #include "ui/compositor/layer_animator.h" | 80 #include "ui/compositor/layer_animator.h" |
| 82 #include "ui/gfx/display.h" | 81 #include "ui/gfx/display.h" |
| 83 #include "ui/gfx/image/image_skia.h" | 82 #include "ui/gfx/image/image_skia.h" |
| 84 #include "ui/gfx/screen.h" | 83 #include "ui/gfx/screen.h" |
| 85 #include "ui/gfx/size.h" | 84 #include "ui/gfx/size.h" |
| 86 #include "ui/ui_controls/ui_controls.h" | 85 #include "ui/ui_controls/ui_controls.h" |
| 87 #include "ui/views/corewm/compound_event_filter.h" | 86 #include "ui/views/corewm/compound_event_filter.h" |
| 88 #include "ui/views/corewm/input_method_event_filter.h" | 87 #include "ui/views/corewm/input_method_event_filter.h" |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 203 new internal::OutputConfiguratorAnimation()), | 202 new internal::OutputConfiguratorAnimation()), |
| 204 #endif // defined(OS_CHROMEOS) | 203 #endif // defined(OS_CHROMEOS) |
| 205 browser_context_(NULL), | 204 browser_context_(NULL), |
| 206 simulate_modal_window_open_for_testing_(false) { | 205 simulate_modal_window_open_for_testing_(false) { |
| 207 DCHECK(delegate_.get()); | 206 DCHECK(delegate_.get()); |
| 208 display_manager_.reset(new internal::DisplayManager); | 207 display_manager_.reset(new internal::DisplayManager); |
| 209 ANNOTATE_LEAKING_OBJECT_PTR(screen_); // see crbug.com/156466 | 208 ANNOTATE_LEAKING_OBJECT_PTR(screen_); // see crbug.com/156466 |
| 210 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_ALTERNATE, screen_); | 209 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_ALTERNATE, screen_); |
| 211 if (!gfx::Screen::GetScreenByType(gfx::SCREEN_TYPE_NATIVE)) | 210 if (!gfx::Screen::GetScreenByType(gfx::SCREEN_TYPE_NATIVE)) |
| 212 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, screen_); | 211 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, screen_); |
| 213 ui_controls::InstallUIControlsAura(internal::CreateUIControls()); | 212 ui_controls::UIControls* uicontrols = internal::CreateUIControls(); |
| 213 ANNOTATE_LEAKING_OBJECT_PTR(uicontrols); | |
|
oshima
2012/11/15 23:37:41
Isn't it possible to delete old one in SetUIContro
scottmg
2012/11/16 17:58:54
Done.
| |
| 214 ui_controls::UIControls::SetUIControlsInstance( | |
| 215 ui_controls::UI_CONTROLS_TYPE_ALTERNATE, uicontrols); | |
| 216 if (!ui_controls::UIControls::GetUIControlsByType( | |
| 217 ui_controls::UI_CONTROLS_TYPE_NATIVE)) | |
| 218 ui_controls::UIControls::SetUIControlsInstance( | |
| 219 ui_controls::UI_CONTROLS_TYPE_NATIVE, uicontrols); | |
|
oshima
2012/11/15 23:37:41
you need {} in this case.
scottmg
2012/11/16 17:58:54
Done.
| |
| 214 #if defined(OS_CHROMEOS) | 220 #if defined(OS_CHROMEOS) |
| 215 content::GpuFeatureType blacklisted_features = | 221 content::GpuFeatureType blacklisted_features = |
| 216 content::GpuDataManager::GetInstance()->GetBlacklistedFeatures(); | 222 content::GpuDataManager::GetInstance()->GetBlacklistedFeatures(); |
| 217 bool is_panel_fitting_disabled = | 223 bool is_panel_fitting_disabled = |
| 218 (blacklisted_features & content::GPU_FEATURE_TYPE_PANEL_FITTING) || | 224 (blacklisted_features & content::GPU_FEATURE_TYPE_PANEL_FITTING) || |
| 219 CommandLine::ForCurrentProcess()->HasSwitch( | 225 CommandLine::ForCurrentProcess()->HasSwitch( |
| 220 switches::kAshDisablePanelFitting); | 226 switches::kAshDisablePanelFitting); |
| 221 output_configurator_->Init(!is_panel_fitting_disabled); | 227 output_configurator_->Init(!is_panel_fitting_disabled); |
| 222 | 228 |
| 223 output_configurator_->AddObserver(output_configurator_animation_.get()); | 229 output_configurator_->AddObserver(output_configurator_animation_.get()); |
| (...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 857 | 863 |
| 858 bool Shell::CanAcceptEvents() { | 864 bool Shell::CanAcceptEvents() { |
| 859 return true; | 865 return true; |
| 860 } | 866 } |
| 861 | 867 |
| 862 ui::EventTarget* Shell::GetParentTarget() { | 868 ui::EventTarget* Shell::GetParentTarget() { |
| 863 return NULL; | 869 return NULL; |
| 864 } | 870 } |
| 865 | 871 |
| 866 } // namespace ash | 872 } // namespace ash |
| OLD | NEW |