OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "athena/wm/split_view_controller.h" | 5 #include "athena/wm/split_view_controller.h" |
6 | 6 |
7 #include <cmath> | 7 #include <cmath> |
8 | 8 |
9 #include "athena/screen/public/screen_manager.h" | 9 #include "athena/screen/public/screen_manager.h" |
10 #include "athena/wm/public/window_list_provider.h" | 10 #include "athena/wm/public/window_list_provider.h" |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 // screen while engaging splitview (i.e. state_ == SCROLLING). | 166 // screen while engaging splitview (i.e. state_ == SCROLLING). |
167 if (state_ == INACTIVE && !animate) { | 167 if (state_ == INACTIVE && !animate) { |
168 if (!wm::IsActiveWindow(left_window_)) | 168 if (!wm::IsActiveWindow(left_window_)) |
169 left_window_->Hide(); | 169 left_window_->Hide(); |
170 if (!wm::IsActiveWindow(right_window_)) | 170 if (!wm::IsActiveWindow(right_window_)) |
171 right_window_->Hide(); | 171 right_window_->Hide(); |
172 SetWindowTransforms(gfx::Transform(), gfx::Transform(), false); | 172 SetWindowTransforms(gfx::Transform(), gfx::Transform(), false); |
173 return; | 173 return; |
174 } | 174 } |
175 | 175 |
| 176 left_window_->layer()->SetOpacity(1.0f); |
176 left_window_->Show(); | 177 left_window_->Show(); |
| 178 right_window_->layer()->SetOpacity(1.0f); |
177 right_window_->Show(); | 179 right_window_->Show(); |
178 if (state_ == ACTIVE) { | 180 if (state_ == ACTIVE) { |
179 if (animate) { | 181 if (animate) { |
180 gfx::Transform left_transform = GetTargetTransformForBoundsAnimation( | 182 gfx::Transform left_transform = GetTargetTransformForBoundsAnimation( |
181 left_window_->bounds(), GetLeftTargetBounds()); | 183 left_window_->bounds(), GetLeftTargetBounds()); |
182 gfx::Transform right_transform = GetTargetTransformForBoundsAnimation( | 184 gfx::Transform right_transform = GetTargetTransformForBoundsAnimation( |
183 right_window_->bounds(), GetRightTargetBounds()); | 185 right_window_->bounds(), GetRightTargetBounds()); |
184 SetWindowTransforms(left_transform, right_transform, true); | 186 SetWindowTransforms(left_transform, right_transform, true); |
185 } else { | 187 } else { |
186 left_window_->SetBounds(GetLeftTargetBounds()); | 188 left_window_->SetBounds(GetLeftTargetBounds()); |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
312 bool SplitViewController::CanScroll() { | 314 bool SplitViewController::CanScroll() { |
313 // TODO(mfomitchev): return false in full screen. | 315 // TODO(mfomitchev): return false in full screen. |
314 bool result = (!IsSplitViewModeActive() && | 316 bool result = (!IsSplitViewModeActive() && |
315 window_list_provider_->GetWindowList().size() >= 2 && | 317 window_list_provider_->GetWindowList().size() >= 2 && |
316 IsLandscapeOrientation(gfx::Screen::GetNativeScreen()-> | 318 IsLandscapeOrientation(gfx::Screen::GetNativeScreen()-> |
317 GetDisplayNearestWindow(container_).rotation())); | 319 GetDisplayNearestWindow(container_).rotation())); |
318 return result; | 320 return result; |
319 } | 321 } |
320 | 322 |
321 } // namespace athena | 323 } // namespace athena |
OLD | NEW |