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

Unified Diff: ash/wm/immersive_fullscreen_controller.cc

Issue 198413003: Enable immersive fullscreen on Windows Ash. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix issues from previous review comment. Created 6 years, 9 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/wm/immersive_fullscreen_controller.h ('k') | ash/wm/immersive_fullscreen_controller_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/immersive_fullscreen_controller.cc
diff --git a/ash/wm/immersive_fullscreen_controller.cc b/ash/wm/immersive_fullscreen_controller.cc
index 9912308ca0171669b32e39b54fec02d337ae34ba..976eaaef65f7efb94e5aaf3504e8ac916a73eede 100644
--- a/ash/wm/immersive_fullscreen_controller.cc
+++ b/ash/wm/immersive_fullscreen_controller.cc
@@ -62,13 +62,6 @@ const int kSwipeVerticalThresholdMultiplier = 3;
// See ShouldIgnoreMouseEventAtLocation() for more details.
const int kHeightOfDeadRegionAboveTopContainer = 10;
-// The height in pixels of the region below the top edge of the display in which
-// the mouse can trigger revealing the top-of-window views. The height must be
-// greater than 1px because the top pixel is used to trigger moving the cursor
-// between displays if the user has a vertical display layout (primary display
-// above/below secondary display).
-const int kMouseRevealBoundsHeight = 3;
-
// Returns the BubbleDelegateView corresponding to |maybe_bubble| if
// |maybe_bubble| is a bubble.
views::BubbleDelegateView* AsBubbleDelegate(aura::Window* maybe_bubble) {
@@ -111,6 +104,20 @@ gfx::Rect GetDisplayBoundsInScreen(aura::Window* window) {
} // namespace
+// The height in pixels of the region below the top edge of the display in which
+// the mouse can trigger revealing the top-of-window views.
+#if defined(OS_WIN)
+// Windows 8 reserves some pixels at the top of the screen for the hand icon
+// that allows you to drag a metro app off the screen, so a few additional
+// pixels of space must be reserved for the mouse reveal.
+const int ImmersiveFullscreenController::kMouseRevealBoundsHeight = 9;
+#else
+// The height must be greater than 1px because the top pixel is used to trigger
+// moving the cursor between displays if the user has a vertical display layout
+// (primary display above/below secondary display).
+const int ImmersiveFullscreenController::kMouseRevealBoundsHeight = 3;
+#endif
+
////////////////////////////////////////////////////////////////////////////////
// Class which keeps the top-of-window views revealed as long as one of the
@@ -397,6 +404,12 @@ void ImmersiveFullscreenController::OnGestureEvent(ui::GestureEvent* event) {
return;
switch (event->type()) {
+#if defined(OS_WIN)
+ case ui::ET_GESTURE_WIN8_EDGE_SWIPE:
+ UpdateRevealedLocksForSwipe(GetSwipeType(event));
+ event->SetHandled();
+ break;
+#endif
case ui::ET_GESTURE_SCROLL_BEGIN:
if (ShouldHandleGestureEvent(GetEventLocationInScreen(*event))) {
gesture_begun_ = true;
@@ -850,6 +863,10 @@ void ImmersiveFullscreenController::OnSlideClosedAnimationCompleted() {
ImmersiveFullscreenController::SwipeType
ImmersiveFullscreenController::GetSwipeType(ui::GestureEvent* event) const {
+#if defined(OS_WIN)
+ if (event->type() == ui::ET_GESTURE_WIN8_EDGE_SWIPE)
+ return SWIPE_OPEN;
+#endif
if (event->type() != ui::ET_GESTURE_SCROLL_UPDATE)
return SWIPE_NONE;
// Make sure that it is a clear vertical gesture.
« no previous file with comments | « ash/wm/immersive_fullscreen_controller.h ('k') | ash/wm/immersive_fullscreen_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698