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

Unified Diff: ash/wm/gestures/shelf_gesture_handler.cc

Issue 14740012: Enable shelf gestures in immersive mode (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Changed method name as requested and removed code duplication Created 7 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/shelf/shelf_layout_manager.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/gestures/shelf_gesture_handler.cc
diff --git a/ash/wm/gestures/shelf_gesture_handler.cc b/ash/wm/gestures/shelf_gesture_handler.cc
index aba69fd9e803655ceafbb3cb91cd0cb5969c96fc..2d3e9b99a5e40de57ab66e85594fea98c70a3698 100644
--- a/ash/wm/gestures/shelf_gesture_handler.cc
+++ b/ash/wm/gestures/shelf_gesture_handler.cc
@@ -12,6 +12,7 @@
#include "ash/shell.h"
#include "ash/system/status_area_widget.h"
#include "ash/wm/gestures/tray_gesture_handler.h"
+#include "ash/wm/window_properties.h"
#include "ash/wm/window_util.h"
#include "ui/aura/window.h"
#include "ui/compositor/layer.h"
@@ -37,14 +38,17 @@ bool ShelfGestureHandler::ProcessGestureEvent(const ui::GestureEvent& event) {
return false;
}
- // The gesture are disabled for fullscreen windows.
- aura::Window* active = wm::GetActiveWindow();
- if (active && wm::IsWindowFullscreen(active))
+ // TODO(oshima): Find the root window controller from event's location.
+ RootWindowController* controller = Shell::GetPrimaryRootWindowController();
+
+ ShelfLayoutManager* shelf = controller->GetShelfLayoutManager();
+
+ // The gesture are disabled for fullscreen windows that are not in immersive
+ // mode.
+ aura::Window* fullscreen = controller->GetFullscreenWindow();
+ if (fullscreen && !shelf->FullscreenWithMinimalChrome())
return false;
- // TODO(oshima): Find the root window controller from event's location.
- ShelfLayoutManager* shelf =
- Shell::GetPrimaryRootWindowController()->GetShelfLayoutManager();
if (event.type() == ui::ET_GESTURE_SCROLL_BEGIN) {
drag_in_progress_ = true;
shelf->StartGestureDrag(event);
« no previous file with comments | « ash/shelf/shelf_layout_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698