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

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

Issue 143023003: Fully support the autohide shelf option for touch UI on Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Compile out edge swipe code on non-Windows, and add tests. 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/touch/touch_uma.cc ('k') | ash/wm/system_gesture_event_filter.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/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/root_window_controller.h"
8 #include "ash/session_state_delegate.h" 8 #include "ash/session_state_delegate.h"
9 #include "ash/shelf/shelf_layout_manager.h" 9 #include "ash/shelf/shelf_layout_manager.h"
10 #include "ash/shelf/shelf_types.h" 10 #include "ash/shelf/shelf_types.h"
(...skipping 25 matching lines...) Expand all
36 shell->session_state_delegate()->IsScreenLocked()) { 36 shell->session_state_delegate()->IsScreenLocked()) {
37 // The gestures are disabled in the lock/login screen. 37 // The gestures are disabled in the lock/login screen.
38 return false; 38 return false;
39 } 39 }
40 40
41 // TODO(oshima): Find the root window controller from event's location. 41 // TODO(oshima): Find the root window controller from event's location.
42 RootWindowController* controller = Shell::GetPrimaryRootWindowController(); 42 RootWindowController* controller = Shell::GetPrimaryRootWindowController();
43 43
44 ShelfLayoutManager* shelf = controller->GetShelfLayoutManager(); 44 ShelfLayoutManager* shelf = controller->GetShelfLayoutManager();
45 45
46 #if defined(OS_WIN)
sky 2014/02/11 18:55:22 Is there a reason we need the ifdefs here and in t
47 if (event.type() == ui::ET_GESTURE_WIN8_EDGE_SWIPE) {
48 shelf->OnGestureEdgeSwipe(event);
49 return true;
50 }
51 #endif
52
46 const aura::Window* fullscreen = controller->GetWindowForFullscreenMode(); 53 const aura::Window* fullscreen = controller->GetWindowForFullscreenMode();
47 if (fullscreen && 54 if (fullscreen &&
48 ash::wm::GetWindowState(fullscreen)->hide_shelf_when_fullscreen()) { 55 ash::wm::GetWindowState(fullscreen)->hide_shelf_when_fullscreen()) {
49 return false; 56 return false;
50 } 57 }
51 58
52 if (event.type() == ui::ET_GESTURE_SCROLL_BEGIN) { 59 if (event.type() == ui::ET_GESTURE_SCROLL_BEGIN) {
53 drag_in_progress_ = true; 60 drag_in_progress_ = true;
54 shelf->StartGestureDrag(event); 61 shelf->StartGestureDrag(event);
55 return true; 62 return true;
(...skipping 27 matching lines...) Expand all
83 return true; 90 return true;
84 } 91 }
85 92
86 // Unexpected event. Reset the state and let the event fall through. 93 // Unexpected event. Reset the state and let the event fall through.
87 shelf->CancelGestureDrag(); 94 shelf->CancelGestureDrag();
88 return false; 95 return false;
89 } 96 }
90 97
91 } // namespace internal 98 } // namespace internal
92 } // namespace ash 99 } // namespace ash
OLDNEW
« no previous file with comments | « ash/touch/touch_uma.cc ('k') | ash/wm/system_gesture_event_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698