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

Side by Side Diff: ash/wm/gestures/shelf_gesture_handler.cc

Issue 11017079: Remove Shell::shelf()|status_area_widget()|launcher() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 2 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/wm/app_list_controller.cc ('k') | ash/wm/gestures/system_pinch_handler.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/wm/gestures/shelf_gesture_handler.h" 5 #include "ash/wm/gestures/shelf_gesture_handler.h"
6 6
7 #include "ash/root_window_controller.h"
7 #include "ash/shell.h" 8 #include "ash/shell.h"
8 #include "ash/shell_delegate.h" 9 #include "ash/shell_delegate.h"
9 #include "ash/system/status_area_widget.h" 10 #include "ash/system/status_area_widget.h"
10 #include "ash/wm/gestures/tray_gesture_handler.h" 11 #include "ash/wm/gestures/tray_gesture_handler.h"
11 #include "ash/wm/shelf_layout_manager.h" 12 #include "ash/wm/shelf_layout_manager.h"
12 #include "ash/wm/shelf_types.h" 13 #include "ash/wm/shelf_types.h"
13 #include "ash/wm/window_util.h" 14 #include "ash/wm/window_util.h"
14 #include "ui/aura/window.h" 15 #include "ui/aura/window.h"
15 #include "ui/compositor/layer.h" 16 #include "ui/compositor/layer.h"
16 #include "ui/compositor/scoped_layer_animation_settings.h" 17 #include "ui/compositor/scoped_layer_animation_settings.h"
(...skipping 16 matching lines...) Expand all
33 shell->delegate()->IsScreenLocked()) { 34 shell->delegate()->IsScreenLocked()) {
34 // The gestures are disabled in the lock/login screen. 35 // The gestures are disabled in the lock/login screen.
35 return false; 36 return false;
36 } 37 }
37 38
38 // The gesture are disabled for fullscreen windows. 39 // The gesture are disabled for fullscreen windows.
39 aura::Window* active = wm::GetActiveWindow(); 40 aura::Window* active = wm::GetActiveWindow();
40 if (active && wm::IsWindowFullscreen(active)) 41 if (active && wm::IsWindowFullscreen(active))
41 return false; 42 return false;
42 43
43 ShelfLayoutManager* shelf = shell->shelf(); 44 // TODO(oshima): Find the root window controller from event's location.
45 ShelfLayoutManager* shelf = Shell::GetPrimaryRootWindowController()->shelf();
44 if (event.type() == ui::ET_GESTURE_SCROLL_BEGIN) { 46 if (event.type() == ui::ET_GESTURE_SCROLL_BEGIN) {
45 drag_in_progress_ = true; 47 drag_in_progress_ = true;
46 shelf->StartGestureDrag(event); 48 shelf->StartGestureDrag(event);
47 return true; 49 return true;
48 } 50 }
49 51
50 if (!drag_in_progress_) 52 if (!drag_in_progress_)
51 return false; 53 return false;
52 54
53 if (event.type() == ui::ET_GESTURE_SCROLL_UPDATE) { 55 if (event.type() == ui::ET_GESTURE_SCROLL_UPDATE) {
(...skipping 21 matching lines...) Expand all
75 return true; 77 return true;
76 } 78 }
77 79
78 // Unexpected event. Reset the state and let the event fall through. 80 // Unexpected event. Reset the state and let the event fall through.
79 shelf->CancelGestureDrag(); 81 shelf->CancelGestureDrag();
80 return false; 82 return false;
81 } 83 }
82 84
83 } // namespace internal 85 } // namespace internal
84 } // namespace ash 86 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/app_list_controller.cc ('k') | ash/wm/gestures/system_pinch_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698