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

Side by Side Diff: ash/wm/shelf_layout_manager.cc

Issue 11030017: Add context to gfx::Screen calls in support of simultaneous desktop+ash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix new addition Created 8 years, 2 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 | « ash/wm/maximize_bubble_controller.cc ('k') | ash/wm/shelf_layout_manager_unittest.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/wm/shelf_layout_manager.h" 5 #include "ash/wm/shelf_layout_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "ash/ash_switches.h" 10 #include "ash/ash_switches.h"
(...skipping 861 matching lines...) Expand 10 before | Expand all | Expand 10 after
872 // Increase the the hit test area to prevent the shelf from disappearing 872 // Increase the the hit test area to prevent the shelf from disappearing
873 // when the mouse is over the bubble gap. 873 // when the mouse is over the bubble gap.
874 shelf_region.Inset(alignment_ == SHELF_ALIGNMENT_RIGHT ? 874 shelf_region.Inset(alignment_ == SHELF_ALIGNMENT_RIGHT ?
875 -kNotificationBubbleGapHeight : 0, 875 -kNotificationBubbleGapHeight : 0,
876 alignment_ == SHELF_ALIGNMENT_BOTTOM ? 876 alignment_ == SHELF_ALIGNMENT_BOTTOM ?
877 -kNotificationBubbleGapHeight : 0, 877 -kNotificationBubbleGapHeight : 0,
878 alignment_ == SHELF_ALIGNMENT_LEFT ? 878 alignment_ == SHELF_ALIGNMENT_LEFT ?
879 -kNotificationBubbleGapHeight : 0, 879 -kNotificationBubbleGapHeight : 0,
880 0); 880 0);
881 } 881 }
882 return shelf_region.Contains(gfx::Screen::GetCursorScreenPoint()) ? 882 return shelf_region.Contains(Shell::GetScreen()->GetCursorScreenPoint()) ?
883 AUTO_HIDE_SHOWN : AUTO_HIDE_HIDDEN; 883 AUTO_HIDE_SHOWN : AUTO_HIDE_HIDDEN;
884 } 884 }
885 885
886 void ShelfLayoutManager::UpdateHitTestBounds() { 886 void ShelfLayoutManager::UpdateHitTestBounds() {
887 gfx::Insets insets; 887 gfx::Insets insets;
888 // Only modify the hit test when the shelf is visible, so we don't mess with 888 // Only modify the hit test when the shelf is visible, so we don't mess with
889 // hover hit testing in the auto-hide state. 889 // hover hit testing in the auto-hide state.
890 if (state_.visibility_state == VISIBLE) { 890 if (state_.visibility_state == VISIBLE) {
891 // Let clicks at the very top of the launcher through so windows can be 891 // Let clicks at the very top of the launcher through so windows can be
892 // resized with the bottom-right corner and bottom edge. 892 // resized with the bottom-right corner and bottom edge.
(...skipping 27 matching lines...) Expand all
920 int ShelfLayoutManager::GetWorkAreaSize(const State& state, int size) const { 920 int ShelfLayoutManager::GetWorkAreaSize(const State& state, int size) const {
921 if (state.visibility_state == VISIBLE) 921 if (state.visibility_state == VISIBLE)
922 return size; 922 return size;
923 if (state.visibility_state == AUTO_HIDE) 923 if (state.visibility_state == AUTO_HIDE)
924 return kAutoHideSize; 924 return kAutoHideSize;
925 return 0; 925 return 0;
926 } 926 }
927 927
928 } // namespace internal 928 } // namespace internal
929 } // namespace ash 929 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/maximize_bubble_controller.cc ('k') | ash/wm/shelf_layout_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698