| 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 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 386 : root_window_(new aura::RootWindow), | 388 : root_window_(new aura::RootWindow), |
| 387 screen_(new ScreenAsh(root_window_.get())), | 389 screen_(new ScreenAsh(root_window_.get())), |
| 388 root_filter_(NULL), | 390 root_filter_(NULL), |
| 389 delegate_(delegate), | 391 delegate_(delegate), |
| 390 shelf_(NULL), | 392 shelf_(NULL), |
| 391 root_window_layout_(NULL), | 393 root_window_layout_(NULL), |
| 392 status_widget_(NULL) { | 394 status_widget_(NULL) { |
| 393 aura::Env::GetInstance()->SetMonitorManager( | 395 aura::Env::GetInstance()->SetMonitorManager( |
| 394 aura::CreateSingleMonitorManager(root_window_.get())); | 396 aura::CreateSingleMonitorManager(root_window_.get())); |
| 395 gfx::Screen::SetInstance(screen_); | 397 gfx::Screen::SetInstance(screen_); |
| 398 ui_controls::InstallUIControlsAura(CreateUIControlsAura(root_window_.get())); |
| 396 } | 399 } |
| 397 | 400 |
| 398 Shell::~Shell() { | 401 Shell::~Shell() { |
| 399 RemoveRootWindowEventFilter(partial_screenshot_filter_.get()); | 402 RemoveRootWindowEventFilter(partial_screenshot_filter_.get()); |
| 400 RemoveRootWindowEventFilter(input_method_filter_.get()); | 403 RemoveRootWindowEventFilter(input_method_filter_.get()); |
| 401 RemoveRootWindowEventFilter(window_modality_controller_.get()); | 404 RemoveRootWindowEventFilter(window_modality_controller_.get()); |
| 402 #if !defined(OS_MACOSX) | 405 #if !defined(OS_MACOSX) |
| 403 RemoveRootWindowEventFilter(accelerator_filter_.get()); | 406 RemoveRootWindowEventFilter(accelerator_filter_.get()); |
| 404 #endif | 407 #endif |
| 405 | 408 |
| (...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 713 // Create the desktop background image. | 716 // Create the desktop background image. |
| 714 desktop_background_controller_->SetDefaultDesktopBackgroundImage(); | 717 desktop_background_controller_->SetDefaultDesktopBackgroundImage(); |
| 715 } | 718 } |
| 716 | 719 |
| 717 void Shell::DisableWorkspaceGridLayout() { | 720 void Shell::DisableWorkspaceGridLayout() { |
| 718 if (workspace_controller_.get()) | 721 if (workspace_controller_.get()) |
| 719 workspace_controller_->workspace_manager()->set_grid_size(0); | 722 workspace_controller_->workspace_manager()->set_grid_size(0); |
| 720 } | 723 } |
| 721 | 724 |
| 722 } // namespace ash | 725 } // namespace ash |
| OLD | NEW |