| OLD | NEW | 
|    1 // Copyright 2012 The Chromium Authors. All rights reserved. |    1 // Copyright 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/shelf/shelf_widget.h" |    5 #include "ash/shelf/shelf_widget.h" | 
|    6  |    6  | 
|    7 #include "ash/ash_switches.h" |    7 #include "ash/ash_switches.h" | 
|    8 #include "ash/aura/wm_shelf_aura.h" |    8 #include "ash/aura/wm_shelf_aura.h" | 
|    9 #include "ash/aura/wm_window_aura.h" |    9 #include "ash/aura/wm_window_aura.h" | 
|   10 #include "ash/common/material_design/material_design_controller.h" |   10 #include "ash/common/material_design/material_design_controller.h" | 
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  268     shelf_->RemoveObserver(this); |  268     shelf_->RemoveObserver(this); | 
|  269     shelf_ = NULL; |  269     shelf_ = NULL; | 
|  270   } |  270   } | 
|  271  |  271  | 
|  272   void WillChangeVisibilityState(ShelfVisibilityState new_state) override { |  272   void WillChangeVisibilityState(ShelfVisibilityState new_state) override { | 
|  273     gfx::Insets mouse_insets; |  273     gfx::Insets mouse_insets; | 
|  274     gfx::Insets touch_insets; |  274     gfx::Insets touch_insets; | 
|  275     if (new_state == SHELF_VISIBLE) { |  275     if (new_state == SHELF_VISIBLE) { | 
|  276       // Let clicks at the very top of the shelf through so windows can be |  276       // Let clicks at the very top of the shelf through so windows can be | 
|  277       // resized with the bottom-right corner and bottom edge. |  277       // resized with the bottom-right corner and bottom edge. | 
|  278       mouse_insets = GetInsetsForAlignment( |  278       mouse_insets = GetInsetsForAlignment(kWorkspaceAreaVisibleInset, | 
|  279           ShelfLayoutManager::kWorkspaceAreaVisibleInset, |  279                                            shelf_->GetAlignment()); | 
|  280           shelf_->GetAlignment()); |  | 
|  281     } else if (new_state == SHELF_AUTO_HIDE) { |  280     } else if (new_state == SHELF_AUTO_HIDE) { | 
|  282       // Extend the touch hit target out a bit to allow users to drag shelf out |  281       // Extend the touch hit target out a bit to allow users to drag shelf out | 
|  283       // while hidden. |  282       // while hidden. | 
|  284       touch_insets = GetInsetsForAlignment( |  283       touch_insets = GetInsetsForAlignment(-kWorkspaceAreaAutoHideInset, | 
|  285           -ShelfLayoutManager::kWorkspaceAreaAutoHideInset, |  284                                            shelf_->GetAlignment()); | 
|  286           shelf_->GetAlignment()); |  | 
|  287     } |  285     } | 
|  288  |  286  | 
|  289     set_mouse_extend(mouse_insets); |  287     set_mouse_extend(mouse_insets); | 
|  290     set_touch_extend(touch_insets); |  288     set_touch_extend(touch_insets); | 
|  291   } |  289   } | 
|  292  |  290  | 
|  293   ShelfLayoutManager* shelf_; |  291   ShelfLayoutManager* shelf_; | 
|  294  |  292  | 
|  295   DISALLOW_COPY_AND_ASSIGN(ShelfWindowTargeter); |  293   DISALLOW_COPY_AND_ASSIGN(ShelfWindowTargeter); | 
|  296 }; |  294 }; | 
| (...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  823     shelf_layout_manager_->UpdateAutoHideForMouseEvent(event); |  821     shelf_layout_manager_->UpdateAutoHideForMouseEvent(event); | 
|  824 } |  822 } | 
|  825  |  823  | 
|  826 void ShelfWidget::OnGestureEvent(ui::GestureEvent* event) { |  824 void ShelfWidget::OnGestureEvent(ui::GestureEvent* event) { | 
|  827   Widget::OnGestureEvent(event); |  825   Widget::OnGestureEvent(event); | 
|  828   if (Shell::GetInstance()->in_mus() && shelf_layout_manager_) |  826   if (Shell::GetInstance()->in_mus() && shelf_layout_manager_) | 
|  829     shelf_layout_manager_->UpdateAutoHideForGestureEvent(event); |  827     shelf_layout_manager_->UpdateAutoHideForGestureEvent(event); | 
|  830 } |  828 } | 
|  831  |  829  | 
|  832 }  // namespace ash |  830 }  // namespace ash | 
| OLD | NEW |