| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/immersive_fullscreen_controller.h" | 5 #include "ash/wm/immersive_fullscreen_controller.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 | 8 |
| 9 #include "ash/common/ash_constants.h" | 9 #include "ash/common/ash_constants.h" |
| 10 #include "ash/common/wm/window_state.h" | 10 #include "ash/common/wm/window_state.h" |
| (...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 397 void ImmersiveFullscreenController::OnGestureEvent(ui::GestureEvent* event) { | 397 void ImmersiveFullscreenController::OnGestureEvent(ui::GestureEvent* event) { |
| 398 if (!enabled_) | 398 if (!enabled_) |
| 399 return; | 399 return; |
| 400 | 400 |
| 401 // Touch gestures should not initiate revealing the top-of-window views while | 401 // Touch gestures should not initiate revealing the top-of-window views while |
| 402 // |widget_| is inactive. | 402 // |widget_| is inactive. |
| 403 if (!widget_->IsActive()) | 403 if (!widget_->IsActive()) |
| 404 return; | 404 return; |
| 405 | 405 |
| 406 switch (event->type()) { | 406 switch (event->type()) { |
| 407 #if defined(OS_WIN) | |
| 408 case ui::ET_GESTURE_WIN8_EDGE_SWIPE: | |
| 409 UpdateRevealedLocksForSwipe(GetSwipeType(event)); | |
| 410 event->SetHandled(); | |
| 411 break; | |
| 412 #endif | |
| 413 case ui::ET_GESTURE_SCROLL_BEGIN: | 407 case ui::ET_GESTURE_SCROLL_BEGIN: |
| 414 if (ShouldHandleGestureEvent(GetEventLocationInScreen(*event))) { | 408 if (ShouldHandleGestureEvent(GetEventLocationInScreen(*event))) { |
| 415 gesture_begun_ = true; | 409 gesture_begun_ = true; |
| 416 // Do not consume the event. Otherwise, we end up consuming all | 410 // Do not consume the event. Otherwise, we end up consuming all |
| 417 // ui::ET_GESTURE_SCROLL_BEGIN events in the top-of-window views | 411 // ui::ET_GESTURE_SCROLL_BEGIN events in the top-of-window views |
| 418 // when the top-of-window views are revealed. | 412 // when the top-of-window views are revealed. |
| 419 } | 413 } |
| 420 break; | 414 break; |
| 421 case ui::ET_GESTURE_SCROLL_UPDATE: | 415 case ui::ET_GESTURE_SCROLL_UPDATE: |
| 422 if (gesture_begun_) { | 416 if (gesture_begun_) { |
| (...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 932 ::wm::GetTransientChildren(native_window_); | 926 ::wm::GetTransientChildren(native_window_); |
| 933 for (size_t i = 0; i < transient_children.size(); ++i) { | 927 for (size_t i = 0; i < transient_children.size(); ++i) { |
| 934 aura::Window* transient_child = transient_children[i]; | 928 aura::Window* transient_child = transient_children[i]; |
| 935 views::View* anchor_view = GetAnchorView(transient_child); | 929 views::View* anchor_view = GetAnchorView(transient_child); |
| 936 if (anchor_view && top_container_->Contains(anchor_view)) | 930 if (anchor_view && top_container_->Contains(anchor_view)) |
| 937 bubble_observer_->StartObserving(transient_child); | 931 bubble_observer_->StartObserving(transient_child); |
| 938 } | 932 } |
| 939 } | 933 } |
| 940 | 934 |
| 941 } // namespace ash | 935 } // namespace ash |
| OLD | NEW |