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

Side by Side Diff: ash/shell.cc

Issue 145313003: Implement cursor compositing mode on Ash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Get rid changes in ui/views/. Let Shell call AshNativeCursorManager directly. Created 6 years, 10 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/shell.h ('k') | ash/test/mirror_window_test_api.cc » ('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/accelerator_controller.h" 10 #include "ash/accelerators/accelerator_controller.h"
11 #include "ash/accelerators/accelerator_filter.h" 11 #include "ash/accelerators/accelerator_filter.h"
12 #include "ash/accelerators/focus_manager_factory.h" 12 #include "ash/accelerators/focus_manager_factory.h"
13 #include "ash/accelerators/nested_dispatcher_controller.h" 13 #include "ash/accelerators/nested_dispatcher_controller.h"
14 #include "ash/ash_switches.h" 14 #include "ash/ash_switches.h"
15 #include "ash/autoclick/autoclick_controller.h" 15 #include "ash/autoclick/autoclick_controller.h"
16 #include "ash/caps_lock_delegate.h" 16 #include "ash/caps_lock_delegate.h"
17 #include "ash/desktop_background/desktop_background_controller.h" 17 #include "ash/desktop_background/desktop_background_controller.h"
18 #include "ash/desktop_background/desktop_background_view.h" 18 #include "ash/desktop_background/desktop_background_view.h"
19 #include "ash/desktop_background/user_wallpaper_delegate.h" 19 #include "ash/desktop_background/user_wallpaper_delegate.h"
20 #include "ash/display/cursor_window_controller.h"
20 #include "ash/display/display_controller.h" 21 #include "ash/display/display_controller.h"
21 #include "ash/display/display_manager.h" 22 #include "ash/display/display_manager.h"
22 #include "ash/display/event_transformation_handler.h" 23 #include "ash/display/event_transformation_handler.h"
23 #include "ash/display/mouse_cursor_event_filter.h" 24 #include "ash/display/mouse_cursor_event_filter.h"
24 #include "ash/display/screen_position_controller.h" 25 #include "ash/display/screen_position_controller.h"
25 #include "ash/display/virtual_keyboard_window_controller.h" 26 #include "ash/display/virtual_keyboard_window_controller.h"
26 #include "ash/drag_drop/drag_drop_controller.h" 27 #include "ash/drag_drop/drag_drop_controller.h"
27 #include "ash/first_run/first_run_helper_impl.h" 28 #include "ash/first_run/first_run_helper_impl.h"
28 #include "ash/focus_cycler.h" 29 #include "ash/focus_cycler.h"
29 #include "ash/gpu_support.h" 30 #include "ash/gpu_support.h"
(...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after
545 546
546 is_touch_hud_projection_enabled_ = enabled; 547 is_touch_hud_projection_enabled_ = enabled;
547 FOR_EACH_OBSERVER(ShellObserver, observers_, 548 FOR_EACH_OBSERVER(ShellObserver, observers_,
548 OnTouchHudProjectionToggled(enabled)); 549 OnTouchHudProjectionToggled(enabled));
549 } 550 }
550 551
551 #if defined(OS_CHROMEOS) 552 #if defined(OS_CHROMEOS)
552 ash::FirstRunHelper* Shell::CreateFirstRunHelper() { 553 ash::FirstRunHelper* Shell::CreateFirstRunHelper() {
553 return new ash::FirstRunHelperImpl; 554 return new ash::FirstRunHelperImpl;
554 } 555 }
556
557 void Shell::SetCursorCompositingEnabled(bool enabled) {
558 display_controller_->cursor_window_controller()->SetCursorCompositingEnabled(
559 enabled);
560 native_cursor_manager_->SetNativeCursorEnabled(!enabled);
561 }
555 #endif // defined(OS_CHROMEOS) 562 #endif // defined(OS_CHROMEOS)
556 563
557 void Shell::DoInitialWorkspaceAnimation() { 564 void Shell::DoInitialWorkspaceAnimation() {
558 return GetPrimaryRootWindowController()->workspace_controller()-> 565 return GetPrimaryRootWindowController()->workspace_controller()->
559 DoInitialAnimation(); 566 DoInitialAnimation();
560 } 567 }
561 568
562 //////////////////////////////////////////////////////////////////////////////// 569 ////////////////////////////////////////////////////////////////////////////////
563 // Shell, private: 570 // Shell, private:
564 571
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after
1053 //////////////////////////////////////////////////////////////////////////////// 1060 ////////////////////////////////////////////////////////////////////////////////
1054 // Shell, aura::client::ActivationChangeObserver implementation: 1061 // Shell, aura::client::ActivationChangeObserver implementation:
1055 1062
1056 void Shell::OnWindowActivated(aura::Window* gained_active, 1063 void Shell::OnWindowActivated(aura::Window* gained_active,
1057 aura::Window* lost_active) { 1064 aura::Window* lost_active) {
1058 if (gained_active) 1065 if (gained_active)
1059 target_root_window_ = gained_active->GetRootWindow(); 1066 target_root_window_ = gained_active->GetRootWindow();
1060 } 1067 }
1061 1068
1062 } // namespace ash 1069 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shell.h ('k') | ash/test/mirror_window_test_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698