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_layout_manager.h" | 5 #include "ash/shelf/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 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
440 gesture_drag_auto_hide_state_ = | 440 gesture_drag_auto_hide_state_ = |
441 gesture_drag_auto_hide_state_ == SHELF_AUTO_HIDE_SHOWN ? | 441 gesture_drag_auto_hide_state_ == SHELF_AUTO_HIDE_SHOWN ? |
442 SHELF_AUTO_HIDE_HIDDEN : SHELF_AUTO_HIDE_SHOWN; | 442 SHELF_AUTO_HIDE_HIDDEN : SHELF_AUTO_HIDE_SHOWN; |
443 if (shelf_) | 443 if (shelf_) |
444 shelf_->Deactivate(); | 444 shelf_->Deactivate(); |
445 shelf_->status_area_widget()->Deactivate(); | 445 shelf_->status_area_widget()->Deactivate(); |
446 if (gesture_drag_auto_hide_state_ == SHELF_AUTO_HIDE_HIDDEN && | 446 if (gesture_drag_auto_hide_state_ == SHELF_AUTO_HIDE_HIDDEN && |
447 auto_hide_behavior_ != SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS) { | 447 auto_hide_behavior_ != SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS) { |
448 gesture_drag_status_ = GESTURE_DRAG_NONE; | 448 gesture_drag_status_ = GESTURE_DRAG_NONE; |
449 SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS); | 449 SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS); |
450 aura::Window* active = wm::GetActiveWindow(); | |
Harry McCleave
2013/05/02 20:36:32
Would this not be better served as an if/else pair
rharrison
2013/05/16 17:31:04
Done.
| |
451 if (active && | |
452 wm::IsWindowFullscreen(active) && | |
453 active->GetProperty(kFullscreenUsesMinimalChromeKey)) | |
sadrul
2013/05/02 20:43:58
I am not familiar with this magical key. But it wo
rharrison
2013/05/16 17:31:04
Done.
| |
454 SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_NEVER); | |
pkotwicz
2013/05/06 20:50:37
Drive by:
- You should probably use RootWindowCont
rharrison
2013/05/16 17:31:04
Done.
| |
450 } else if (gesture_drag_auto_hide_state_ == SHELF_AUTO_HIDE_SHOWN && | 455 } else if (gesture_drag_auto_hide_state_ == SHELF_AUTO_HIDE_SHOWN && |
451 auto_hide_behavior_ != SHELF_AUTO_HIDE_BEHAVIOR_NEVER) { | 456 auto_hide_behavior_ != SHELF_AUTO_HIDE_BEHAVIOR_NEVER) { |
452 gesture_drag_status_ = GESTURE_DRAG_NONE; | 457 gesture_drag_status_ = GESTURE_DRAG_NONE; |
453 SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_NEVER); | 458 SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_NEVER); |
454 } else { | 459 } else { |
455 gesture_drag_status_ = GESTURE_DRAG_COMPLETE_IN_PROGRESS; | 460 gesture_drag_status_ = GESTURE_DRAG_COMPLETE_IN_PROGRESS; |
456 UpdateVisibilityState(); | 461 UpdateVisibilityState(); |
457 gesture_drag_status_ = GESTURE_DRAG_NONE; | 462 gesture_drag_status_ = GESTURE_DRAG_NONE; |
458 } | 463 } |
459 LayoutShelf(); | 464 LayoutShelf(); |
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
951 return gfx::Insets(0, distance, 0, 0); | 956 return gfx::Insets(0, distance, 0, 0); |
952 case SHELF_ALIGNMENT_TOP: | 957 case SHELF_ALIGNMENT_TOP: |
953 return gfx::Insets(0, 0, distance, 0); | 958 return gfx::Insets(0, 0, distance, 0); |
954 } | 959 } |
955 NOTREACHED(); | 960 NOTREACHED(); |
956 return gfx::Insets(); | 961 return gfx::Insets(); |
957 } | 962 } |
958 | 963 |
959 } // namespace internal | 964 } // namespace internal |
960 } // namespace ash | 965 } // namespace ash |
OLD | NEW |