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/app_list/app_list.h" | 5 #include "ash/app_list/app_list.h" |
6 | 6 |
7 #include "ash/app_list/app_list_view.h" | 7 #include "ash/app_list/app_list_view.h" |
8 #include "ash/app_list/icon_cache.h" | 8 #include "ash/app_list/icon_cache.h" |
9 #include "ash/shell_delegate.h" | 9 #include "ash/shell_delegate.h" |
10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 // Duration for both default container and app list animation in milliseconds. | 29 // Duration for both default container and app list animation in milliseconds. |
30 const int kAnimationDurationMs = 130; | 30 const int kAnimationDurationMs = 130; |
31 | 31 |
32 // Delayed time of 2nd animation in milliseconds. | 32 // Delayed time of 2nd animation in milliseconds. |
33 const int kSecondAnimationStartDelay = kAnimationDurationMs - 20; | 33 const int kSecondAnimationStartDelay = kAnimationDurationMs - 20; |
34 | 34 |
35 // Gets preferred bounds of app list window. | 35 // Gets preferred bounds of app list window. |
36 gfx::Rect GetPreferredBounds() { | 36 gfx::Rect GetPreferredBounds() { |
37 gfx::Point cursor = gfx::Screen::GetCursorScreenPoint(); | 37 gfx::Point cursor = gfx::Screen::GetCursorScreenPoint(); |
38 // Use full monitor rect so that the app list shade goes behind the launcher. | 38 // Use full monitor rect so that the app list shade goes behind the launcher. |
39 return gfx::Screen::GetMonitorAreaNearestPoint(cursor); | 39 return gfx::Screen::GetMonitorNearestPoint(cursor).bounds(); |
40 } | 40 } |
41 | 41 |
42 ui::Layer* GetLayer(views::Widget* widget) { | 42 ui::Layer* GetLayer(views::Widget* widget) { |
43 return widget->GetNativeView()->layer(); | 43 return widget->GetNativeView()->layer(); |
44 } | 44 } |
45 | 45 |
46 } // namespace | 46 } // namespace |
47 | 47 |
48 //////////////////////////////////////////////////////////////////////////////// | 48 //////////////////////////////////////////////////////////////////////////////// |
49 // AppList, public: | 49 // AppList, public: |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
270 aura::Window* active_window = ash::wm::GetActiveWindow(); | 270 aura::Window* active_window = ash::wm::GetActiveWindow(); |
271 if (active_window->parent() != applist_container && | 271 if (active_window->parent() != applist_container && |
272 active_window->parent() != bubble_container) { | 272 active_window->parent() != bubble_container) { |
273 SetVisible(false); | 273 SetVisible(false); |
274 } | 274 } |
275 } | 275 } |
276 } | 276 } |
277 | 277 |
278 } // namespace internal | 278 } // namespace internal |
279 } // namespace ash | 279 } // namespace ash |
OLD | NEW |