Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(852)

Side by Side Diff: ash/shell.cc

Issue 9960042: Refactor screen/monitor so that gfx::Screen returns monitor object. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix command line Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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/size.h" 87 #include "ui/gfx/size.h"
88 #include "ui/ui_controls/ui_controls.h" 88 #include "ui/ui_controls/ui_controls.h"
89 #include "ui/views/widget/native_widget_aura.h" 89 #include "ui/views/widget/native_widget_aura.h"
(...skipping 750 matching lines...) Expand 10 before | Expand all | Expand 10 after
840 } 840 }
841 841
842 void Shell::RotateFocus(Direction direction) { 842 void Shell::RotateFocus(Direction direction) {
843 focus_cycler_->RotateFocus( 843 focus_cycler_->RotateFocus(
844 direction == FORWARD ? internal::FocusCycler::FORWARD : 844 direction == FORWARD ? internal::FocusCycler::FORWARD :
845 internal::FocusCycler::BACKWARD); 845 internal::FocusCycler::BACKWARD);
846 } 846 }
847 847
848 void Shell::SetMonitorWorkAreaInsets(Window* contains, 848 void Shell::SetMonitorWorkAreaInsets(Window* contains,
849 const gfx::Insets& insets) { 849 const gfx::Insets& insets) {
850 aura::Monitor* monitor = aura::Env::GetInstance()->monitor_manager()-> 850 aura::MonitorAura* monitor = aura::Env::GetInstance()->monitor_manager()->
851 GetMonitorNearestWindow(contains); 851 GetMonitorNearestWindow(contains);
852 if (monitor->work_area_insets() == insets) 852 if (monitor->work_area_insets() == insets)
853 return; 853 return;
854 monitor->set_work_area_insets(insets); 854 monitor->set_work_area_insets(insets);
855 FOR_EACH_OBSERVER(ShellObserver, observers_, 855 FOR_EACH_OBSERVER(ShellObserver, observers_,
856 OnMonitorWorkAreaInsetsChanged()); 856 OnMonitorWorkAreaInsetsChanged());
857 } 857 }
858 858
859 void Shell::CreateLauncher() { 859 void Shell::CreateLauncher() {
860 if (launcher_.get()) 860 if (launcher_.get())
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
934 desktop_background_controller_->SetDesktopBackgroundImageMode( 934 desktop_background_controller_->SetDesktopBackgroundImageMode(
935 GetWallpaper(index), GetWallpaperInfo(index).layout); 935 GetWallpaper(index), GetWallpaperInfo(index).layout);
936 } 936 }
937 937
938 void Shell::DisableWorkspaceGridLayout() { 938 void Shell::DisableWorkspaceGridLayout() {
939 if (workspace_controller_.get()) 939 if (workspace_controller_.get())
940 workspace_controller_->workspace_manager()->set_grid_size(0); 940 workspace_controller_->workspace_manager()->set_grid_size(0);
941 } 941 }
942 942
943 } // namespace ash 943 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698