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

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

Issue 2172363002: Created min size for print preview dialog and modified to allow the Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix targeting and missing widget on unit tests. Created 4 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
« ui/aura/window_targeter.cc ('K') | « ui/aura/window_targeter.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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 121
122 void WindowModalityController::OnKeyEvent(ui::KeyEvent* event) { 122 void WindowModalityController::OnKeyEvent(ui::KeyEvent* event) {
123 aura::Window* target = static_cast<aura::Window*>(event->target()); 123 aura::Window* target = static_cast<aura::Window*>(event->target());
124 if (GetModalTransient(target)) 124 if (GetModalTransient(target))
125 event->SetHandled(); 125 event->SetHandled();
126 } 126 }
127 127
128 void WindowModalityController::OnMouseEvent(ui::MouseEvent* event) { 128 void WindowModalityController::OnMouseEvent(ui::MouseEvent* event) {
129 aura::Window* target = static_cast<aura::Window*>(event->target()); 129 aura::Window* target = static_cast<aura::Window*>(event->target());
130 if (ProcessLocatedEvent(target, event)) 130 if (ProcessLocatedEvent(target, event))
131 event->SetHandled(); 131 event->SetHandled();
132 } 132 }
133 133
134 void WindowModalityController::OnTouchEvent(ui::TouchEvent* event) { 134 void WindowModalityController::OnTouchEvent(ui::TouchEvent* event) {
135 aura::Window* target = static_cast<aura::Window*>(event->target()); 135 aura::Window* target = static_cast<aura::Window*>(event->target());
136 if (ProcessLocatedEvent(target, event)) 136 if (ProcessLocatedEvent(target, event))
137 event->SetHandled(); 137 event->SetHandled();
138 } 138 }
139 139
140 //////////////////////////////////////////////////////////////////////////////// 140 ////////////////////////////////////////////////////////////////////////////////
141 // WindowModalityController, aura::EnvObserver implementation: 141 // WindowModalityController, aura::EnvObserver implementation:
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 } 207 }
208 208
209 AnimateWindow(modal_transient_child, WINDOW_ANIMATION_TYPE_BOUNCE); 209 AnimateWindow(modal_transient_child, WINDOW_ANIMATION_TYPE_BOUNCE);
210 } 210 }
211 if (event->type() == ui::ET_TOUCH_CANCELLED) 211 if (event->type() == ui::ET_TOUCH_CANCELLED)
212 return false; 212 return false;
213 return !!modal_transient_child; 213 return !!modal_transient_child;
214 } 214 }
215 215
216 } // namespace wm 216 } // namespace wm
OLDNEW
« ui/aura/window_targeter.cc ('K') | « ui/aura/window_targeter.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698