| 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 #include "base/bind.h" | 55 #include "base/bind.h" |
| 56 #include "base/command_line.h" | 56 #include "base/command_line.h" |
| 57 #include "grit/ui_resources.h" | 57 #include "grit/ui_resources.h" |
| 58 #include "third_party/skia/include/core/SkBitmap.h" | 58 #include "third_party/skia/include/core/SkBitmap.h" |
| 59 #include "ui/aura/client/aura_constants.h" | 59 #include "ui/aura/client/aura_constants.h" |
| 60 #include "ui/aura/env.h" | 60 #include "ui/aura/env.h" |
| 61 #include "ui/aura/layout_manager.h" | 61 #include "ui/aura/layout_manager.h" |
| 62 #include "ui/aura/monitor.h" | 62 #include "ui/aura/monitor.h" |
| 63 #include "ui/aura/monitor_manager.h" | 63 #include "ui/aura/monitor_manager.h" |
| 64 #include "ui/aura/root_window.h" | 64 #include "ui/aura/root_window.h" |
| 65 #include "ui/aura/ui_controls_aura.h" |
| 65 #include "ui/aura/window.h" | 66 #include "ui/aura/window.h" |
| 66 #include "ui/gfx/compositor/layer.h" | 67 #include "ui/gfx/compositor/layer.h" |
| 67 #include "ui/gfx/compositor/layer_animator.h" | 68 #include "ui/gfx/compositor/layer_animator.h" |
| 68 #include "ui/gfx/size.h" | 69 #include "ui/gfx/size.h" |
| 70 #include "ui/ui_controls/ui_controls.h" |
| 69 #include "ui/views/widget/native_widget_aura.h" | 71 #include "ui/views/widget/native_widget_aura.h" |
| 70 #include "ui/views/widget/widget.h" | 72 #include "ui/views/widget/widget.h" |
| 71 | 73 |
| 72 #if !defined(OS_MACOSX) | 74 #if !defined(OS_MACOSX) |
| 73 #include "ash/accelerators/accelerator_controller.h" | 75 #include "ash/accelerators/accelerator_controller.h" |
| 74 #include "ash/accelerators/accelerator_filter.h" | 76 #include "ash/accelerators/accelerator_filter.h" |
| 75 #include "ash/accelerators/nested_dispatcher_controller.h" | 77 #include "ash/accelerators/nested_dispatcher_controller.h" |
| 76 #endif | 78 #endif |
| 77 | 79 |
| 78 namespace ash { | 80 namespace ash { |
| (...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 346 network_controller_(NULL), | 348 network_controller_(NULL), |
| 347 power_status_controller_(NULL), | 349 power_status_controller_(NULL), |
| 348 update_controller_(NULL), | 350 update_controller_(NULL), |
| 349 shelf_(NULL), | 351 shelf_(NULL), |
| 350 desktop_background_mode_(BACKGROUND_IMAGE), | 352 desktop_background_mode_(BACKGROUND_IMAGE), |
| 351 root_window_layout_(NULL), | 353 root_window_layout_(NULL), |
| 352 status_widget_(NULL) { | 354 status_widget_(NULL) { |
| 353 aura::Env::GetInstance()->SetMonitorManager( | 355 aura::Env::GetInstance()->SetMonitorManager( |
| 354 aura::CreateSingleMonitorManager(root_window_.get())); | 356 aura::CreateSingleMonitorManager(root_window_.get())); |
| 355 gfx::Screen::SetInstance(screen_); | 357 gfx::Screen::SetInstance(screen_); |
| 358 ui_controls::InstallUIControlsAura(CreateUIControlsAura(root_window_.get())); |
| 356 } | 359 } |
| 357 | 360 |
| 358 Shell::~Shell() { | 361 Shell::~Shell() { |
| 359 RemoveRootWindowEventFilter(partial_screenshot_filter_.get()); | 362 RemoveRootWindowEventFilter(partial_screenshot_filter_.get()); |
| 360 RemoveRootWindowEventFilter(input_method_filter_.get()); | 363 RemoveRootWindowEventFilter(input_method_filter_.get()); |
| 361 RemoveRootWindowEventFilter(window_modality_controller_.get()); | 364 RemoveRootWindowEventFilter(window_modality_controller_.get()); |
| 362 #if !defined(OS_MACOSX) | 365 #if !defined(OS_MACOSX) |
| 363 RemoveRootWindowEventFilter(accelerator_filter_.get()); | 366 RemoveRootWindowEventFilter(accelerator_filter_.get()); |
| 364 #endif | 367 #endif |
| 365 | 368 |
| (...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 691 // Create the desktop background image. | 694 // Create the desktop background image. |
| 692 SetDesktopBackgroundMode(BACKGROUND_IMAGE); | 695 SetDesktopBackgroundMode(BACKGROUND_IMAGE); |
| 693 } | 696 } |
| 694 | 697 |
| 695 void Shell::DisableWorkspaceGridLayout() { | 698 void Shell::DisableWorkspaceGridLayout() { |
| 696 if (workspace_controller_.get()) | 699 if (workspace_controller_.get()) |
| 697 workspace_controller_->workspace_manager()->set_grid_size(0); | 700 workspace_controller_->workspace_manager()->set_grid_size(0); |
| 698 } | 701 } |
| 699 | 702 |
| 700 } // namespace ash | 703 } // namespace ash |
| OLD | NEW |