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

Side by Side Diff: athena/wm/split_view_controller.cc

Issue 546123002: Ensure that an activity is activated when overview mode is exited (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698