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

Side by Side Diff: ash/shell.cc

Issue 9808010: Keep the mouse cursor within desktop (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 8 years, 9 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 #include "ui/ui_controls/ui_controls.h" 84 #include "ui/ui_controls/ui_controls.h"
85 #include "ui/views/widget/native_widget_aura.h" 85 #include "ui/views/widget/native_widget_aura.h"
86 #include "ui/views/widget/widget.h" 86 #include "ui/views/widget/widget.h"
87 87
88 #if !defined(OS_MACOSX) 88 #if !defined(OS_MACOSX)
89 #include "ash/accelerators/accelerator_controller.h" 89 #include "ash/accelerators/accelerator_controller.h"
90 #include "ash/accelerators/accelerator_filter.h" 90 #include "ash/accelerators/accelerator_filter.h"
91 #include "ash/accelerators/nested_dispatcher_controller.h" 91 #include "ash/accelerators/nested_dispatcher_controller.h"
92 #endif 92 #endif
93 93
94 #if defined(USE_X11)
95 #include "ui/aura/monitor_change_observer_x11.h"
96 #endif
97
98 namespace ash { 94 namespace ash {
99 95
100 namespace { 96 namespace {
101 97
102 using aura::Window; 98 using aura::Window;
103 using views::Widget; 99 using views::Widget;
104 100
105 // Creates a new window for use as a container. 101 // Creates a new window for use as a container.
106 aura::Window* CreateContainer(int window_id, 102 aura::Window* CreateContainer(int window_id,
107 const char* name, 103 const char* name,
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after
572 568
573 DCHECK(instance_ == this); 569 DCHECK(instance_ == this);
574 instance_ = NULL; 570 instance_ = NULL;
575 } 571 }
576 572
577 // static 573 // static
578 Shell* Shell::CreateInstance(ShellDelegate* delegate) { 574 Shell* Shell::CreateInstance(ShellDelegate* delegate) {
579 CHECK(!instance_); 575 CHECK(!instance_);
580 aura::Env::GetInstance()->SetMonitorManager( 576 aura::Env::GetInstance()->SetMonitorManager(
581 new internal::MultiMonitorManager()); 577 new internal::MultiMonitorManager());
582 #if defined(USE_X11)
583 aura::Env::GetInstance()->monitor_change_observer()->NotifyMonitorChange();
584 #endif
585 instance_ = new Shell(delegate); 578 instance_ = new Shell(delegate);
586 instance_->Init(); 579 instance_->Init();
587 return instance_; 580 return instance_;
588 } 581 }
589 582
590 // static 583 // static
591 Shell* Shell::GetInstance() { 584 Shell* Shell::GetInstance() {
592 DCHECK(instance_); 585 DCHECK(instance_);
593 return instance_; 586 return instance_;
594 } 587 }
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
885 desktop_background_controller_->SetDesktopBackgroundImageMode( 878 desktop_background_controller_->SetDesktopBackgroundImageMode(
886 GetWallpaper(index), GetWallpaperInfo(index).layout); 879 GetWallpaper(index), GetWallpaperInfo(index).layout);
887 } 880 }
888 881
889 void Shell::DisableWorkspaceGridLayout() { 882 void Shell::DisableWorkspaceGridLayout() {
890 if (workspace_controller_.get()) 883 if (workspace_controller_.get())
891 workspace_controller_->workspace_manager()->set_grid_size(0); 884 workspace_controller_->workspace_manager()->set_grid_size(0);
892 } 885 }
893 886
894 } // namespace ash 887 } // namespace ash
OLDNEW
« no previous file with comments | « ash/monitor/multi_monitor_manager.cc ('k') | base/message_pump_x.h » ('j') | ui/aura/env.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698