| 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/shelf/shelf_view.h" | 5 #include "ash/shelf/shelf_view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "ash/ash_constants.h" | 9 #include "ash/ash_constants.h" |
| 10 #include "ash/ash_switches.h" | 10 #include "ash/ash_switches.h" |
| (...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 button->ClearState(LauncherButton::STATE_RUNNING); | 320 button->ClearState(LauncherButton::STATE_RUNNING); |
| 321 button->AddState(LauncherButton::STATE_ATTENTION); | 321 button->AddState(LauncherButton::STATE_ATTENTION); |
| 322 break; | 322 break; |
| 323 } | 323 } |
| 324 } | 324 } |
| 325 | 325 |
| 326 // Get the event location in screen coordinates. | 326 // Get the event location in screen coordinates. |
| 327 gfx::Point GetPositionInScreen(const gfx::Point& root_location, | 327 gfx::Point GetPositionInScreen(const gfx::Point& root_location, |
| 328 views::View* view) { | 328 views::View* view) { |
| 329 gfx::Point root_location_in_screen = root_location; | 329 gfx::Point root_location_in_screen = root_location; |
| 330 aura::RootWindow* root_window = | 330 aura::Window* root_window = |
| 331 view->GetWidget()->GetNativeWindow()->GetRootWindow(); | 331 view->GetWidget()->GetNativeWindow()->GetRootWindow(); |
| 332 aura::client::GetScreenPositionClient(root_window->GetRootWindow())-> | 332 aura::client::GetScreenPositionClient(root_window->GetRootWindow())-> |
| 333 ConvertPointToScreen(root_window, &root_location_in_screen); | 333 ConvertPointToScreen(root_window, &root_location_in_screen); |
| 334 return root_location_in_screen; | 334 return root_location_in_screen; |
| 335 } | 335 } |
| 336 | 336 |
| 337 } // namespace | 337 } // namespace |
| 338 | 338 |
| 339 // AnimationDelegate used when deleting an item. This steadily decreased the | 339 // AnimationDelegate used when deleting an item. This steadily decreased the |
| 340 // opacity of the layer as the animation progress. | 340 // opacity of the layer as the animation progress. |
| (...skipping 1553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1894 break; | 1894 break; |
| 1895 case ash::SHELF_ALIGNMENT_TOP: | 1895 case ash::SHELF_ALIGNMENT_TOP: |
| 1896 distance = coordinate.y() - bounds.bottom(); | 1896 distance = coordinate.y() - bounds.bottom(); |
| 1897 break; | 1897 break; |
| 1898 } | 1898 } |
| 1899 return distance > 0 ? distance : 0; | 1899 return distance > 0 ? distance : 0; |
| 1900 } | 1900 } |
| 1901 | 1901 |
| 1902 } // namespace internal | 1902 } // namespace internal |
| 1903 } // namespace ash | 1903 } // namespace ash |
| OLD | NEW |