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

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

Issue 11117012: ash: Fix event processing in modal windows in login/lock screen. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
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 849 matching lines...) Expand 10 before | Expand all | Expand 10 after
860 return AUTO_HIDE_SHOWN; 860 return AUTO_HIDE_SHOWN;
861 861
862 if (launcher_widget()->IsActive() || status_->IsActive()) 862 if (launcher_widget()->IsActive() || status_->IsActive())
863 return AUTO_HIDE_SHOWN; 863 return AUTO_HIDE_SHOWN;
864 864
865 // Don't show if the user is dragging the mouse. 865 // Don't show if the user is dragging the mouse.
866 if (event_filter_.get() && event_filter_->in_mouse_drag()) 866 if (event_filter_.get() && event_filter_->in_mouse_drag())
867 return AUTO_HIDE_HIDDEN; 867 return AUTO_HIDE_HIDDEN;
868 868
869 gfx::Rect shelf_region = launcher_widget()->GetWindowBoundsInScreen(); 869 gfx::Rect shelf_region = launcher_widget()->GetWindowBoundsInScreen();
870 if (Shell::GetInstance()->status_area_widget()->IsMessageBubbleShown() && 870 if (shell->status_area_widget() &&
871 shell->status_area_widget()->IsMessageBubbleShown() &&
871 IsVisible()) { 872 IsVisible()) {
872 // Increase the the hit test area to prevent the shelf from disappearing 873 // Increase the the hit test area to prevent the shelf from disappearing
873 // when the mouse is over the bubble gap. 874 // when the mouse is over the bubble gap.
874 shelf_region.Inset(alignment_ == SHELF_ALIGNMENT_RIGHT ? 875 shelf_region.Inset(alignment_ == SHELF_ALIGNMENT_RIGHT ?
875 -kNotificationBubbleGapHeight : 0, 876 -kNotificationBubbleGapHeight : 0,
876 alignment_ == SHELF_ALIGNMENT_BOTTOM ? 877 alignment_ == SHELF_ALIGNMENT_BOTTOM ?
877 -kNotificationBubbleGapHeight : 0, 878 -kNotificationBubbleGapHeight : 0,
878 alignment_ == SHELF_ALIGNMENT_LEFT ? 879 alignment_ == SHELF_ALIGNMENT_LEFT ?
879 -kNotificationBubbleGapHeight : 0, 880 -kNotificationBubbleGapHeight : 0,
880 0); 881 0);
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
920 int ShelfLayoutManager::GetWorkAreaSize(const State& state, int size) const { 921 int ShelfLayoutManager::GetWorkAreaSize(const State& state, int size) const {
921 if (state.visibility_state == VISIBLE) 922 if (state.visibility_state == VISIBLE)
922 return size; 923 return size;
923 if (state.visibility_state == AUTO_HIDE) 924 if (state.visibility_state == AUTO_HIDE)
924 return kAutoHideSize; 925 return kAutoHideSize;
925 return 0; 926 return 0;
926 } 927 }
927 928
928 } // namespace internal 929 } // namespace internal
929 } // namespace ash 930 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698