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

Side by Side Diff: ash/app_list/app_list.cc

Issue 9960042: Refactor screen/monitor so that gfx::Screen returns monitor object. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 8 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | ash/app_list/app_list_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | ash/app_list/app_list_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698