| 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 #include "ash/wm/workspace/workspace_layout_manager.h" | 69 #include "ash/wm/workspace/workspace_layout_manager.h" |
| 70 #include "ash/wm/workspace/workspace_manager.h" | 70 #include "ash/wm/workspace/workspace_manager.h" |
| 71 #include "ash/wm/workspace_controller.h" | 71 #include "ash/wm/workspace_controller.h" |
| 72 #include "base/bind.h" | 72 #include "base/bind.h" |
| 73 #include "base/command_line.h" | 73 #include "base/command_line.h" |
| 74 #include "grit/ui_resources.h" | 74 #include "grit/ui_resources.h" |
| 75 #include "third_party/skia/include/core/SkBitmap.h" | 75 #include "third_party/skia/include/core/SkBitmap.h" |
| 76 #include "ui/aura/client/aura_constants.h" | 76 #include "ui/aura/client/aura_constants.h" |
| 77 #include "ui/aura/env.h" | 77 #include "ui/aura/env.h" |
| 78 #include "ui/aura/layout_manager.h" | 78 #include "ui/aura/layout_manager.h" |
| 79 #include "ui/aura/monitor.h" | 79 #include "ui/aura/monitor_aura.h" |
| 80 #include "ui/aura/monitor_manager.h" | 80 #include "ui/aura/monitor_manager.h" |
| 81 #include "ui/aura/monitor_manager.h" | 81 #include "ui/aura/monitor_manager.h" |
| 82 #include "ui/aura/root_window.h" | 82 #include "ui/aura/root_window.h" |
| 83 #include "ui/aura/ui_controls_aura.h" | 83 #include "ui/aura/ui_controls_aura.h" |
| 84 #include "ui/aura/window.h" | 84 #include "ui/aura/window.h" |
| 85 #include "ui/gfx/compositor/layer.h" | 85 #include "ui/gfx/compositor/layer.h" |
| 86 #include "ui/gfx/compositor/layer_animator.h" | 86 #include "ui/gfx/compositor/layer_animator.h" |
| 87 #include "ui/gfx/screen.h" |
| 87 #include "ui/gfx/size.h" | 88 #include "ui/gfx/size.h" |
| 88 #include "ui/ui_controls/ui_controls.h" | 89 #include "ui/ui_controls/ui_controls.h" |
| 89 #include "ui/views/widget/native_widget_aura.h" | 90 #include "ui/views/widget/native_widget_aura.h" |
| 90 #include "ui/views/widget/widget.h" | 91 #include "ui/views/widget/widget.h" |
| 91 | 92 |
| 92 #if !defined(OS_MACOSX) | 93 #if !defined(OS_MACOSX) |
| 93 #include "ash/accelerators/accelerator_controller.h" | 94 #include "ash/accelerators/accelerator_controller.h" |
| 94 #include "ash/accelerators/accelerator_filter.h" | 95 #include "ash/accelerators/accelerator_filter.h" |
| 95 #include "ash/accelerators/nested_dispatcher_controller.h" | 96 #include "ash/accelerators/nested_dispatcher_controller.h" |
| 96 #endif | 97 #endif |
| (...skipping 738 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 835 } | 836 } |
| 836 | 837 |
| 837 void Shell::RotateFocus(Direction direction) { | 838 void Shell::RotateFocus(Direction direction) { |
| 838 focus_cycler_->RotateFocus( | 839 focus_cycler_->RotateFocus( |
| 839 direction == FORWARD ? internal::FocusCycler::FORWARD : | 840 direction == FORWARD ? internal::FocusCycler::FORWARD : |
| 840 internal::FocusCycler::BACKWARD); | 841 internal::FocusCycler::BACKWARD); |
| 841 } | 842 } |
| 842 | 843 |
| 843 void Shell::SetMonitorWorkAreaInsets(Window* contains, | 844 void Shell::SetMonitorWorkAreaInsets(Window* contains, |
| 844 const gfx::Insets& insets) { | 845 const gfx::Insets& insets) { |
| 845 aura::Monitor* monitor = aura::Env::GetInstance()->monitor_manager()-> | 846 aura::MonitorAura* monitor = aura::Env::GetInstance()->monitor_manager()-> |
| 846 GetMonitorNearestWindow(contains); | 847 GetMonitorNearestWindow(contains); |
| 847 if (monitor->work_area_insets() == insets) | 848 if (monitor->work_area_insets() == insets) |
| 848 return; | 849 return; |
| 849 monitor->set_work_area_insets(insets); | 850 monitor->set_work_area_insets(insets); |
| 850 FOR_EACH_OBSERVER(ShellObserver, observers_, | 851 FOR_EACH_OBSERVER(ShellObserver, observers_, |
| 851 OnMonitorWorkAreaInsetsChanged()); | 852 OnMonitorWorkAreaInsetsChanged()); |
| 852 } | 853 } |
| 853 | 854 |
| 854 void Shell::CreateLauncher() { | 855 void Shell::CreateLauncher() { |
| 855 if (launcher_.get()) | 856 if (launcher_.get()) |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 925 // Create desktop background widget. | 926 // Create desktop background widget. |
| 926 desktop_background_controller_->SetDesktopBackgroundImageMode(); | 927 desktop_background_controller_->SetDesktopBackgroundImageMode(); |
| 927 } | 928 } |
| 928 | 929 |
| 929 void Shell::DisableWorkspaceGridLayout() { | 930 void Shell::DisableWorkspaceGridLayout() { |
| 930 if (workspace_controller_.get()) | 931 if (workspace_controller_.get()) |
| 931 workspace_controller_->workspace_manager()->set_grid_size(0); | 932 workspace_controller_->workspace_manager()->set_grid_size(0); |
| 932 } | 933 } |
| 933 | 934 |
| 934 } // namespace ash | 935 } // namespace ash |
| OLD | NEW |