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

Side by Side Diff: ash/shell.cc

Issue 10919135: Move ash specific cursor code to CursorManager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 3 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
« no previous file with comments | « ash/extended_desktop_unittest.cc ('k') | ash/wm/cursor_manager.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include <string> 8 #include <string>
9 9
10 #include "ash/accelerators/focus_manager_factory.h" 10 #include "ash/accelerators/focus_manager_factory.h"
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 focus_manager_.reset(new aura::FocusManager); 365 focus_manager_.reset(new aura::FocusManager);
366 activation_controller_.reset( 366 activation_controller_.reset(
367 new internal::ActivationController(focus_manager_.get())); 367 new internal::ActivationController(focus_manager_.get()));
368 368
369 screen_position_controller_.reset(new internal::ScreenPositionController); 369 screen_position_controller_.reset(new internal::ScreenPositionController);
370 display_controller_.reset(new DisplayController); 370 display_controller_.reset(new DisplayController);
371 display_controller_->InitPrimaryDisplay(); 371 display_controller_->InitPrimaryDisplay();
372 aura::RootWindow* root_window = display_controller_->GetPrimaryRootWindow(); 372 aura::RootWindow* root_window = display_controller_->GetPrimaryRootWindow();
373 active_root_window_ = root_window; 373 active_root_window_ = root_window;
374 374
375 cursor_manager_.SetDeviceScaleFactor(
376 root_window->AsRootWindowHostDelegate()->GetDeviceScaleFactor());
377
375 #if !defined(OS_MACOSX) 378 #if !defined(OS_MACOSX)
376 nested_dispatcher_controller_.reset(new NestedDispatcherController); 379 nested_dispatcher_controller_.reset(new NestedDispatcherController);
377 accelerator_controller_.reset(new AcceleratorController); 380 accelerator_controller_.reset(new AcceleratorController);
378 #endif 381 #endif
379 shell_context_menu_.reset(new internal::ShellContextMenu); 382 shell_context_menu_.reset(new internal::ShellContextMenu);
380 383
381 // The order in which event filters are added is significant. 384 // The order in which event filters are added is significant.
382 DCHECK(!GetEnvEventFilterCount()); 385 DCHECK(!GetEnvEventFilterCount());
383 user_activity_detector_.reset(new UserActivityDetector); 386 user_activity_detector_.reset(new UserActivityDetector);
384 AddEnvEventFilter(user_activity_detector_.get()); 387 AddEnvEventFilter(user_activity_detector_.get());
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
756 } 759 }
757 760
758 void Shell::ShowCursor(bool visible) { 761 void Shell::ShowCursor(bool visible) {
759 RootWindowList root_windows = GetAllRootWindows(); 762 RootWindowList root_windows = GetAllRootWindows();
760 for (RootWindowList::iterator iter = root_windows.begin(); 763 for (RootWindowList::iterator iter = root_windows.begin();
761 iter != root_windows.end(); ++iter) 764 iter != root_windows.end(); ++iter)
762 (*iter)->ShowCursor(visible); 765 (*iter)->ShowCursor(visible);
763 } 766 }
764 767
765 } // namespace ash 768 } // namespace ash
OLDNEW
« no previous file with comments | « ash/extended_desktop_unittest.cc ('k') | ash/wm/cursor_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698