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

Side by Side Diff: ui/wm/core/window_modality_controller.cc

Issue 252673002: Fixed screen capture confirmation dialog to be either system or browser window modal. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 | « chrome/browser/ui/views/simple_message_box_views.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "ui/wm/core/window_modality_controller.h" 5 #include "ui/wm/core/window_modality_controller.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "ui/aura/client/aura_constants.h" 9 #include "ui/aura/client/aura_constants.h"
10 #include "ui/aura/client/capture_client.h" 10 #include "ui/aura/client/capture_client.h"
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 window->RemoveObserver(this); 177 window->RemoveObserver(this);
178 } 178 }
179 179
180 bool WindowModalityController::ProcessLocatedEvent(aura::Window* target, 180 bool WindowModalityController::ProcessLocatedEvent(aura::Window* target,
181 ui::LocatedEvent* event) { 181 ui::LocatedEvent* event) {
182 if (event->handled()) 182 if (event->handled())
183 return false; 183 return false;
184 aura::Window* modal_transient_child = GetModalTransient(target); 184 aura::Window* modal_transient_child = GetModalTransient(target);
185 if (modal_transient_child && (event->type() == ui::ET_MOUSE_PRESSED || 185 if (modal_transient_child && (event->type() == ui::ET_MOUSE_PRESSED ||
186 event->type() == ui::ET_TOUCH_PRESSED)) { 186 event->type() == ui::ET_TOUCH_PRESSED)) {
187 // Activate top window if transient child window is window modal.
188 if (TransientChildIsWindowModal(modal_transient_child)) {
189 aura::Window* toplevel = GetToplevelWindow(target);
oshima 2014/04/25 19:06:06 shouldn't this be modal_transient_child?
zel 2014/04/25 20:44:40 it makes no difference since it boils down to the
190 DCHECK(toplevel);
191 ActivateWindow(toplevel);
192 }
193
187 AnimateWindow(modal_transient_child, WINDOW_ANIMATION_TYPE_BOUNCE); 194 AnimateWindow(modal_transient_child, WINDOW_ANIMATION_TYPE_BOUNCE);
188 } 195 }
189 if (event->type() == ui::ET_TOUCH_CANCELLED) 196 if (event->type() == ui::ET_TOUCH_CANCELLED)
190 return false; 197 return false;
191 return !!modal_transient_child; 198 return !!modal_transient_child;
192 } 199 }
193 200
194 } // namespace wm 201 } // namespace wm
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/simple_message_box_views.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698