| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/common/shelf/shelf_view.h" | 5 #include "ash/common/shelf/shelf_view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "ash/common/ash_constants.h" | 10 #include "ash/common/ash_constants.h" |
| 11 #include "ash/common/ash_switches.h" | |
| 12 #include "ash/common/drag_drop/drag_image_view.h" | 11 #include "ash/common/drag_drop/drag_image_view.h" |
| 13 #include "ash/common/scoped_root_window_for_new_windows.h" | 12 #include "ash/common/scoped_root_window_for_new_windows.h" |
| 14 #include "ash/common/shelf/app_list_button.h" | 13 #include "ash/common/shelf/app_list_button.h" |
| 15 #include "ash/common/shelf/overflow_bubble.h" | 14 #include "ash/common/shelf/overflow_bubble.h" |
| 16 #include "ash/common/shelf/overflow_bubble_view.h" | 15 #include "ash/common/shelf/overflow_bubble_view.h" |
| 17 #include "ash/common/shelf/overflow_button.h" | 16 #include "ash/common/shelf/overflow_button.h" |
| 18 #include "ash/common/shelf/shelf_button.h" | 17 #include "ash/common/shelf/shelf_button.h" |
| 19 #include "ash/common/shelf/shelf_constants.h" | 18 #include "ash/common/shelf/shelf_constants.h" |
| 20 #include "ash/common/shelf/shelf_delegate.h" | 19 #include "ash/common/shelf/shelf_delegate.h" |
| 21 #include "ash/common/shelf/shelf_menu_model.h" | 20 #include "ash/common/shelf/shelf_menu_model.h" |
| (...skipping 1891 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1913 | 1912 |
| 1914 int ShelfView::CalculateShelfDistance(const gfx::Point& coordinate) const { | 1913 int ShelfView::CalculateShelfDistance(const gfx::Point& coordinate) const { |
| 1915 const gfx::Rect bounds = GetBoundsInScreen(); | 1914 const gfx::Rect bounds = GetBoundsInScreen(); |
| 1916 int distance = wm_shelf_->SelectValueForShelfAlignment( | 1915 int distance = wm_shelf_->SelectValueForShelfAlignment( |
| 1917 bounds.y() - coordinate.y(), coordinate.x() - bounds.right(), | 1916 bounds.y() - coordinate.y(), coordinate.x() - bounds.right(), |
| 1918 bounds.x() - coordinate.x()); | 1917 bounds.x() - coordinate.x()); |
| 1919 return distance > 0 ? distance : 0; | 1918 return distance > 0 ? distance : 0; |
| 1920 } | 1919 } |
| 1921 | 1920 |
| 1922 } // namespace ash | 1921 } // namespace ash |
| OLD | NEW |