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

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

Issue 10795027: Move a window if the sceren bounds being set is in other display. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: adjust for win_aura Created 8 years, 5 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
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/ash_switches.h" 7 #include "ash/ash_switches.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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 bool SystemModalContainerLayoutManager::CanWindowReceiveEvents( 146 bool SystemModalContainerLayoutManager::CanWindowReceiveEvents(
147 aura::Window* window) { 147 aura::Window* window) {
148 // This container can not handle events if the screen is locked and it is not 148 // This container can not handle events if the screen is locked and it is not
149 // above the lock screen layer (crbug.com/110920). 149 // above the lock screen layer (crbug.com/110920).
150 if (ash::Shell::GetInstance()->IsScreenLocked() && 150 if (ash::Shell::GetInstance()->IsScreenLocked() &&
151 container_->id() < ash::internal::kShellWindowId_LockScreenContainer) 151 container_->id() < ash::internal::kShellWindowId_LockScreenContainer)
152 return true; 152 return true;
153 return wm::GetActivatableWindow(window) == modal_window(); 153 return wm::GetActivatableWindow(window) == modal_window();
154 } 154 }
155 155
156 bool SystemModalContainerLayoutManager::IsModalScreen(
157 aura::Window* window) {
158 int id = window->parent()->id();
159 return (id == internal::kShellWindowId_SystemModalContainer ||
160 id == internal::kShellWindowId_LockSystemModalContainer) &&
161 window->GetProperty(aura::client::kModalKey) == ui::MODAL_TYPE_NONE;
162 }
163
156 //////////////////////////////////////////////////////////////////////////////// 164 ////////////////////////////////////////////////////////////////////////////////
157 // SystemModalContainerLayoutManager, private: 165 // SystemModalContainerLayoutManager, private:
158 166
159 void SystemModalContainerLayoutManager::AddModalWindow(aura::Window* window) { 167 void SystemModalContainerLayoutManager::AddModalWindow(aura::Window* window) {
160 if (modal_windows_.empty()) { 168 if (modal_windows_.empty()) {
161 aura::Window* capture_window = aura::client::GetCaptureWindow(container_); 169 aura::Window* capture_window = aura::client::GetCaptureWindow(container_);
162 if (capture_window) 170 if (capture_window)
163 capture_window->ReleaseCapture(); 171 capture_window->ReleaseCapture();
164 } 172 }
165 modal_windows_.push_back(window); 173 modal_windows_.push_back(window);
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 modal_screen_->Close(); 220 modal_screen_->Close();
213 settings.AddObserver( 221 settings.AddObserver(
214 CreateHidingWindowAnimationObserver(modal_screen_->GetNativeView())); 222 CreateHidingWindowAnimationObserver(modal_screen_->GetNativeView()));
215 modal_screen_->GetNativeView()->layer()->SetOpacity(0.0f); 223 modal_screen_->GetNativeView()->layer()->SetOpacity(0.0f);
216 modal_screen_ = NULL; 224 modal_screen_ = NULL;
217 } 225 }
218 } 226 }
219 227
220 } // namespace internal 228 } // namespace internal
221 } // namespace ash 229 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/system_modal_container_layout_manager.h ('k') | ash/wm/workspace/workspace_window_resizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698