| 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 | 8 |
| 9 #include "ash/app_list/app_list.h" | 9 #include "ash/app_list/app_list.h" |
| 10 #include "ash/ash_switches.h" | 10 #include "ash/ash_switches.h" |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 #include "base/bind.h" | 58 #include "base/bind.h" |
| 59 #include "base/command_line.h" | 59 #include "base/command_line.h" |
| 60 #include "grit/ui_resources.h" | 60 #include "grit/ui_resources.h" |
| 61 #include "third_party/skia/include/core/SkBitmap.h" | 61 #include "third_party/skia/include/core/SkBitmap.h" |
| 62 #include "ui/aura/client/aura_constants.h" | 62 #include "ui/aura/client/aura_constants.h" |
| 63 #include "ui/aura/env.h" | 63 #include "ui/aura/env.h" |
| 64 #include "ui/aura/layout_manager.h" | 64 #include "ui/aura/layout_manager.h" |
| 65 #include "ui/aura/monitor.h" | 65 #include "ui/aura/monitor.h" |
| 66 #include "ui/aura/monitor_manager.h" | 66 #include "ui/aura/monitor_manager.h" |
| 67 #include "ui/aura/root_window.h" | 67 #include "ui/aura/root_window.h" |
| 68 #include "ui/aura/ui_controls_aura.h" |
| 68 #include "ui/aura/window.h" | 69 #include "ui/aura/window.h" |
| 69 #include "ui/gfx/compositor/layer.h" | 70 #include "ui/gfx/compositor/layer.h" |
| 70 #include "ui/gfx/compositor/layer_animator.h" | 71 #include "ui/gfx/compositor/layer_animator.h" |
| 71 #include "ui/gfx/size.h" | 72 #include "ui/gfx/size.h" |
| 73 #include "ui/ui_controls/ui_controls.h" |
| 72 #include "ui/views/widget/native_widget_aura.h" | 74 #include "ui/views/widget/native_widget_aura.h" |
| 73 #include "ui/views/widget/widget.h" | 75 #include "ui/views/widget/widget.h" |
| 74 | 76 |
| 75 #if !defined(OS_MACOSX) | 77 #if !defined(OS_MACOSX) |
| 76 #include "ash/accelerators/accelerator_controller.h" | 78 #include "ash/accelerators/accelerator_controller.h" |
| 77 #include "ash/accelerators/accelerator_filter.h" | 79 #include "ash/accelerators/accelerator_filter.h" |
| 78 #include "ash/accelerators/nested_dispatcher_controller.h" | 80 #include "ash/accelerators/nested_dispatcher_controller.h" |
| 79 #endif | 81 #endif |
| 80 | 82 |
| 81 namespace ash { | 83 namespace ash { |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 342 : root_window_(new aura::RootWindow), | 344 : root_window_(new aura::RootWindow), |
| 343 screen_(new ScreenAsh(root_window_.get())), | 345 screen_(new ScreenAsh(root_window_.get())), |
| 344 root_filter_(NULL), | 346 root_filter_(NULL), |
| 345 delegate_(delegate), | 347 delegate_(delegate), |
| 346 shelf_(NULL), | 348 shelf_(NULL), |
| 347 root_window_layout_(NULL), | 349 root_window_layout_(NULL), |
| 348 status_widget_(NULL) { | 350 status_widget_(NULL) { |
| 349 aura::Env::GetInstance()->SetMonitorManager( | 351 aura::Env::GetInstance()->SetMonitorManager( |
| 350 aura::CreateSingleMonitorManager(root_window_.get())); | 352 aura::CreateSingleMonitorManager(root_window_.get())); |
| 351 gfx::Screen::SetInstance(screen_); | 353 gfx::Screen::SetInstance(screen_); |
| 354 ui_controls::InstallUIControlsAura(CreateUIControlsAura(root_window_.get())); |
| 352 } | 355 } |
| 353 | 356 |
| 354 Shell::~Shell() { | 357 Shell::~Shell() { |
| 355 RemoveRootWindowEventFilter(partial_screenshot_filter_.get()); | 358 RemoveRootWindowEventFilter(partial_screenshot_filter_.get()); |
| 356 RemoveRootWindowEventFilter(input_method_filter_.get()); | 359 RemoveRootWindowEventFilter(input_method_filter_.get()); |
| 357 RemoveRootWindowEventFilter(window_modality_controller_.get()); | 360 RemoveRootWindowEventFilter(window_modality_controller_.get()); |
| 358 #if !defined(OS_MACOSX) | 361 #if !defined(OS_MACOSX) |
| 359 RemoveRootWindowEventFilter(accelerator_filter_.get()); | 362 RemoveRootWindowEventFilter(accelerator_filter_.get()); |
| 360 #endif | 363 #endif |
| 361 | 364 |
| (...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 669 // Create the desktop background image. | 672 // Create the desktop background image. |
| 670 desktop_background_controller_->SetDefaultDesktopBackgroundImage(); | 673 desktop_background_controller_->SetDefaultDesktopBackgroundImage(); |
| 671 } | 674 } |
| 672 | 675 |
| 673 void Shell::DisableWorkspaceGridLayout() { | 676 void Shell::DisableWorkspaceGridLayout() { |
| 674 if (workspace_controller_.get()) | 677 if (workspace_controller_.get()) |
| 675 workspace_controller_->workspace_manager()->set_grid_size(0); | 678 workspace_controller_->workspace_manager()->set_grid_size(0); |
| 676 } | 679 } |
| 677 | 680 |
| 678 } // namespace ash | 681 } // namespace ash |
| OLD | NEW |