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

Side by Side Diff: athena/wm/window_manager_impl.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/wm/split_view_controller.cc ('k') | extensions/shell/browser/shell_desktop_controller.h » ('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/window_manager_impl.h" 5 #include "athena/wm/window_manager_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "athena/common/container_priorities.h" 9 #include "athena/common/container_priorities.h"
10 #include "athena/screen/public/screen_manager.h" 10 #include "athena/screen/public/screen_manager.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 } else { 83 } else {
84 window->SetBounds(gfx::Rect(work_area)); 84 window->SetBounds(gfx::Rect(work_area));
85 } 85 }
86 } 86 }
87 } 87 }
88 88
89 void AthenaContainerLayoutManager::OnWindowAddedToLayout(aura::Window* child) { 89 void AthenaContainerLayoutManager::OnWindowAddedToLayout(aura::Window* child) {
90 aura::Window::Windows list = instance->window_list_provider_->GetWindowList(); 90 aura::Window::Windows list = instance->window_list_provider_->GetWindowList();
91 if (std::find(list.begin(), list.end(), child) == list.end()) 91 if (std::find(list.begin(), list.end(), child) == list.end())
92 return; 92 return;
93 aura::Window* window = NULL; 93 gfx::Size size;
94 if (instance->split_view_controller_->IsSplitViewModeActive()) 94 if (instance->split_view_controller_->IsSplitViewModeActive()) {
95 window = instance->split_view_controller_->left_window(); 95 size = instance->split_view_controller_->left_window()->bounds().size();
96 else 96 } else {
97 window = instance->container_.get(); 97 size =
98 CHECK(window); 98 gfx::Screen::GetNativeScreen()->GetPrimaryDisplay().work_area().size();
99 child->SetBounds(gfx::Rect(window->bounds().size())); 99 }
100 child->SetBounds(gfx::Rect(size));
100 } 101 }
101 102
102 void AthenaContainerLayoutManager::OnWillRemoveWindowFromLayout( 103 void AthenaContainerLayoutManager::OnWillRemoveWindowFromLayout(
103 aura::Window* child) { 104 aura::Window* child) {
104 } 105 }
105 106
106 void AthenaContainerLayoutManager::OnWindowRemovedFromLayout( 107 void AthenaContainerLayoutManager::OnWindowRemovedFromLayout(
107 aura::Window* child) { 108 aura::Window* child) {
108 } 109 }
109 110
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 DCHECK(!instance); 332 DCHECK(!instance);
332 } 333 }
333 334
334 // static 335 // static
335 WindowManager* WindowManager::GetInstance() { 336 WindowManager* WindowManager::GetInstance() {
336 DCHECK(instance); 337 DCHECK(instance);
337 return instance; 338 return instance;
338 } 339 }
339 340
340 } // namespace athena 341 } // namespace athena
OLDNEW
« no previous file with comments | « athena/wm/split_view_controller.cc ('k') | extensions/shell/browser/shell_desktop_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698