| 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 "ui/app_list/views/app_list_view.h" | 5 #include "ui/app_list/views/app_list_view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 792 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 803 // made to the maximize mode/side shelf friendly versions. | 803 // made to the maximize mode/side shelf friendly versions. |
| 804 if (new_state == PEEKING) | 804 if (new_state == PEEKING) |
| 805 new_state_override = FULLSCREEN_ALL_APPS; | 805 new_state_override = FULLSCREEN_ALL_APPS; |
| 806 else if (new_state == HALF) | 806 else if (new_state == HALF) |
| 807 new_state_override = FULLSCREEN_SEARCH; | 807 new_state_override = FULLSCREEN_SEARCH; |
| 808 } | 808 } |
| 809 | 809 |
| 810 gfx::Rect new_widget_bounds = fullscreen_widget_->GetWindowBoundsInScreen(); | 810 gfx::Rect new_widget_bounds = fullscreen_widget_->GetWindowBoundsInScreen(); |
| 811 int display_height = display::Screen::GetScreen() | 811 int display_height = display::Screen::GetScreen() |
| 812 ->GetDisplayNearestView(parent_window()) | 812 ->GetDisplayNearestView(parent_window()) |
| 813 .work_area() | 813 .size() |
| 814 .bottom(); | 814 .height(); |
| 815 | 815 |
| 816 switch (new_state_override) { | 816 switch (new_state_override) { |
| 817 case PEEKING: { | 817 case PEEKING: { |
| 818 switch (app_list_state_) { | 818 switch (app_list_state_) { |
| 819 case HALF: | 819 case HALF: |
| 820 case FULLSCREEN_ALL_APPS: | 820 case FULLSCREEN_ALL_APPS: |
| 821 case PEEKING: { | 821 case PEEKING: { |
| 822 int peeking_app_list_y = display_height - kPeekingAppListHeight; | 822 int peeking_app_list_y = display_height - kPeekingAppListHeight; |
| 823 new_widget_bounds.set_y(peeking_app_list_y); | 823 new_widget_bounds.set_y(peeking_app_list_y); |
| 824 app_list_main_view_->contents_view()->SetActiveState( | 824 app_list_main_view_->contents_view()->SetActiveState( |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 966 .work_area() | 966 .work_area() |
| 967 .size(); | 967 .size(); |
| 968 size.Enlarge(0, kShelfSize); | 968 size.Enlarge(0, kShelfSize); |
| 969 fullscreen_widget_->SetSize(size); | 969 fullscreen_widget_->SetSize(size); |
| 970 | 970 |
| 971 // Update the |fullscreen_widget_| bounds to accomodate the new work area. | 971 // Update the |fullscreen_widget_| bounds to accomodate the new work area. |
| 972 SetState(app_list_state_); | 972 SetState(app_list_state_); |
| 973 } | 973 } |
| 974 | 974 |
| 975 } // namespace app_list | 975 } // namespace app_list |
| OLD | NEW |