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

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

Issue 465803002: Make the minimized home card not overlap activities on Athena (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed sadrul@'s comments + rebased Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « athena/test/test_screen_manager_delegate.cc ('k') | athena/wm/window_manager_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/wm/public/window_list_provider.h" 9 #include "athena/wm/public/window_list_provider.h"
10 #include "athena/wm/public/window_manager.h" 10 #include "athena/wm/public/window_manager.h"
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 window->SetTransform(transform); 161 window->SetTransform(transform);
162 } 162 }
163 } 163 }
164 164
165 void SplitViewController::OnAnimationCompleted(aura::Window* window) { 165 void SplitViewController::OnAnimationCompleted(aura::Window* window) {
166 // Animation can be cancelled when deactivated. 166 // Animation can be cancelled when deactivated.
167 if (left_window_ == NULL) 167 if (left_window_ == NULL)
168 return; 168 return;
169 DCHECK(window == left_window_ || window == right_window_); 169 DCHECK(window == left_window_ || window == right_window_);
170 if (state_ == ACTIVE) { 170 if (state_ == ACTIVE) {
171 gfx::Rect window_bounds = gfx::Rect(container_->bounds().size()); 171 int container_width = container_->bounds().width();
172 int container_width = window_bounds.width(); 172 gfx::Display display = gfx::Screen::GetNativeScreen()->GetPrimaryDisplay();
173 window_bounds.set_width(container_width / 2); 173 gfx::Rect window_bounds(container_width / 2, display.work_area().height());
174 window->SetTransform(gfx::Transform()); 174 window->SetTransform(gfx::Transform());
175 if (window == left_window_) { 175 if (window == left_window_) {
176 left_window_->SetBounds(window_bounds); 176 left_window_->SetBounds(window_bounds);
177 } else { 177 } else {
178 window_bounds.set_x(container_width / 2); 178 window_bounds.set_x(container_width / 2);
179 right_window_->SetBounds(window_bounds); 179 right_window_->SetBounds(window_bounds);
180 } 180 }
181 } else { 181 } else {
182 int container_width = container_->bounds().width(); 182 int container_width = container_->bounds().width();
183 window->SetTransform(gfx::Transform()); 183 window->SetTransform(gfx::Transform());
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 } 267 }
268 268
269 bool SplitViewController::CanScroll() { 269 bool SplitViewController::CanScroll() {
270 // TODO(mfomitchev): return false in vertical orientation, in full screen. 270 // TODO(mfomitchev): return false in vertical orientation, in full screen.
271 bool result = (!IsSplitViewModeActive() && 271 bool result = (!IsSplitViewModeActive() &&
272 window_list_provider_->GetWindowList().size() >= 2); 272 window_list_provider_->GetWindowList().size() >= 2);
273 return result; 273 return result;
274 } 274 }
275 275
276 } // namespace athena 276 } // namespace athena
OLDNEW
« no previous file with comments | « athena/test/test_screen_manager_delegate.cc ('k') | athena/wm/window_manager_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698