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

Side by Side Diff: ash/wm/system_modal_container_layout_manager.cc

Issue 115153002: wm: public window_types. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ozone deps Created 7 years 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
OLDNEW
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 "ash/wm/system_modal_container_layout_manager.h" 5 #include "ash/wm/system_modal_container_layout_manager.h"
6 6
7 #include "ash/session_state_delegate.h" 7 #include "ash/session_state_delegate.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "ash/shell_window_ids.h" 9 #include "ash/shell_window_ids.h"
10 #include "ash/wm/system_modal_container_event_filter.h" 10 #include "ash/wm/system_modal_container_event_filter.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 gfx::Rect bounds = (*it)->bounds(); 56 gfx::Rect bounds = (*it)->bounds();
57 bounds.AdjustToFit(container_->bounds()); 57 bounds.AdjustToFit(container_->bounds());
58 (*it)->SetBounds(bounds); 58 (*it)->SetBounds(bounds);
59 } 59 }
60 } 60 }
61 } 61 }
62 62
63 void SystemModalContainerLayoutManager::OnWindowAddedToLayout( 63 void SystemModalContainerLayoutManager::OnWindowAddedToLayout(
64 aura::Window* child) { 64 aura::Window* child) {
65 DCHECK((modal_background_ && child == modal_background_->GetNativeView()) || 65 DCHECK((modal_background_ && child == modal_background_->GetNativeView()) ||
66 child->type() == aura::client::WINDOW_TYPE_NORMAL || 66 child->type() == ui::wm::WINDOW_TYPE_NORMAL ||
67 child->type() == aura::client::WINDOW_TYPE_POPUP); 67 child->type() == ui::wm::WINDOW_TYPE_POPUP);
68 DCHECK( 68 DCHECK(
69 container_->id() != internal::kShellWindowId_LockSystemModalContainer || 69 container_->id() != internal::kShellWindowId_LockSystemModalContainer ||
70 Shell::GetInstance()->session_state_delegate()->IsUserSessionBlocked()); 70 Shell::GetInstance()->session_state_delegate()->IsUserSessionBlocked());
71 71
72 child->AddObserver(this); 72 child->AddObserver(this);
73 if (child->GetProperty(aura::client::kModalKey) != ui::MODAL_TYPE_NONE) 73 if (child->GetProperty(aura::client::kModalKey) != ui::MODAL_TYPE_NONE)
74 AddModalWindow(child); 74 AddModalWindow(child);
75 } 75 }
76 76
77 void SystemModalContainerLayoutManager::OnWillRemoveWindowFromLayout( 77 void SystemModalContainerLayoutManager::OnWillRemoveWindowFromLayout(
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 void SystemModalContainerLayoutManager::RemoveModalWindow( 215 void SystemModalContainerLayoutManager::RemoveModalWindow(
216 aura::Window* window) { 216 aura::Window* window) {
217 aura::Window::Windows::iterator it = 217 aura::Window::Windows::iterator it =
218 std::find(modal_windows_.begin(), modal_windows_.end(), window); 218 std::find(modal_windows_.begin(), modal_windows_.end(), window);
219 if (it != modal_windows_.end()) 219 if (it != modal_windows_.end())
220 modal_windows_.erase(it); 220 modal_windows_.erase(it);
221 } 221 }
222 222
223 } // namespace internal 223 } // namespace internal
224 } // namespace ash 224 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/stacking_controller_unittest.cc ('k') | ash/wm/toplevel_window_event_handler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698