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

Unified Diff: ash/shelf/shelf_layout_manager.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: Rebase to ToT. 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 side-by-side diff with in-line comments
Download patch
Index: ash/shelf/shelf_layout_manager.cc
diff --git a/ash/shelf/shelf_layout_manager.cc b/ash/shelf/shelf_layout_manager.cc
index 3b257b07ca6924122135a75492d13ac5b8cfca8c..93e48ec106d166bb6dbb30a821170c6ef33bad1c 100644
--- a/ash/shelf/shelf_layout_manager.cc
+++ b/ash/shelf/shelf_layout_manager.cc
@@ -389,7 +389,32 @@ void ShelfLayoutManager::RemoveObserver(ShelfLayoutManagerObserver* observer) {
}
////////////////////////////////////////////////////////////////////////////////
-// ShelfLayoutManager, Gesture dragging:
+// ShelfLayoutManager, Gesture functions:
+
+void ShelfLayoutManager::OnGestureEdgeSwipe(const ui::GestureEvent& gesture) {
sky 2014/02/10 15:28:39 Don't we want to do the same thing as in StartGest
+ if (workspace_controller_->GetWindowState() ==
+ WORKSPACE_WINDOW_STATE_FULL_SCREEN) {
+ const std::vector<aura::Window*> windows =
+ ash::MruWindowTracker::BuildWindowList(false);
+
+ // Process the window list and check if there are any visible windows.
sky 2014/02/10 21:31:09 This comment isn't right. And it isn't clear why y
+ for (size_t i = 0; i < windows.size(); ++i) {
+ if (windows[i] && windows[i]->IsVisible() &&
+ root_window_ == windows[i]->GetRootWindow()) {
+ wm::WindowState* window_state = wm::GetWindowState(windows[i]);
+ if (window_state->IsFullscreen())
+ window_state->ToggleFullscreen();
+ }
+ }
+ }
+
+ ShelfVisibilityState visibility = CalculateShelfVisibility();
+ if (visibility == SHELF_AUTO_HIDE &&
+ CalculateAutoHideState(visibility) == SHELF_AUTO_HIDE_HIDDEN) {
+ SetState(SHELF_VISIBLE);
+ SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_NEVER);
+ }
+}
void ShelfLayoutManager::StartGestureDrag(const ui::GestureEvent& gesture) {
gesture_drag_status_ = GESTURE_DRAG_IN_PROGRESS;

Powered by Google App Engine
This is Rietveld 408576698