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/wm/shelf_layout_manager.h" | 5 #include "ash/wm/shelf_layout_manager.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "ash/launcher/launcher.h" | 9 #include "ash/launcher/launcher.h" |
10 #include "ash/screen_ash.h" | 10 #include "ash/screen_ash.h" |
(...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
576 insets.Set(kWorkspaceAreaBottomInset, 0, 0, 0); | 576 insets.Set(kWorkspaceAreaBottomInset, 0, 0, 0); |
577 break; | 577 break; |
578 case SHELF_ALIGNMENT_LEFT: | 578 case SHELF_ALIGNMENT_LEFT: |
579 insets.Set(0, 0, 0, kWorkspaceAreaBottomInset); | 579 insets.Set(0, 0, 0, kWorkspaceAreaBottomInset); |
580 break; | 580 break; |
581 case SHELF_ALIGNMENT_RIGHT: | 581 case SHELF_ALIGNMENT_RIGHT: |
582 insets.Set(0, kWorkspaceAreaBottomInset, 0, 0); | 582 insets.Set(0, kWorkspaceAreaBottomInset, 0, 0); |
583 break; | 583 break; |
584 } | 584 } |
585 } | 585 } |
586 if (launcher_widget() && launcher_widget()->GetNativeWindow()) | 586 if (launcher_widget() && launcher_widget()->GetNativeWindow()) { |
587 launcher_widget()->GetNativeWindow()->set_hit_test_bounds_override_outer( | 587 launcher_widget()->GetNativeWindow()->SetHitTestBoundsOverrideOuter( |
588 insets); | 588 insets, 1); |
589 status_->GetNativeWindow()->set_hit_test_bounds_override_outer(insets); | 589 } |
| 590 status_->GetNativeWindow()->SetHitTestBoundsOverrideOuter( insets, 1); |
590 } | 591 } |
591 | 592 |
592 bool ShelfLayoutManager::IsShelfWindow(aura::Window* window) { | 593 bool ShelfLayoutManager::IsShelfWindow(aura::Window* window) { |
593 if (!window) | 594 if (!window) |
594 return false; | 595 return false; |
595 return (launcher_widget() && | 596 return (launcher_widget() && |
596 launcher_widget()->GetNativeWindow()->Contains(window)) || | 597 launcher_widget()->GetNativeWindow()->Contains(window)) || |
597 (status_ && status_->GetNativeWindow()->Contains(window)); | 598 (status_ && status_->GetNativeWindow()->Contains(window)); |
598 } | 599 } |
599 | 600 |
600 int ShelfLayoutManager::GetWorkAreaSize(const State& state, int size) const { | 601 int ShelfLayoutManager::GetWorkAreaSize(const State& state, int size) const { |
601 if (state.visibility_state == VISIBLE) | 602 if (state.visibility_state == VISIBLE) |
602 return size; | 603 return size; |
603 if (state.visibility_state == AUTO_HIDE) | 604 if (state.visibility_state == AUTO_HIDE) |
604 return kAutoHideSize; | 605 return kAutoHideSize; |
605 return 0; | 606 return 0; |
606 } | 607 } |
607 | 608 |
608 } // namespace internal | 609 } // namespace internal |
609 } // namespace ash | 610 } // namespace ash |
OLD | NEW |