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

Side by Side Diff: ui/aura/window.h

Issue 9580001: Aura: Update window frames, allow resize from outside window (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix caption for maximized windows, new resize cursor tweak Created 8 years, 9 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 #ifndef UI_AURA_WINDOW_H_ 5 #ifndef UI_AURA_WINDOW_H_
6 #define UI_AURA_WINDOW_H_ 6 #define UI_AURA_WINDOW_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 // at Windows below it in the z-order, but only if this Window has children. 218 // at Windows below it in the z-order, but only if this Window has children.
219 // This is used to implement lock-screen type functionality where we do not 219 // This is used to implement lock-screen type functionality where we do not
220 // want events to be sent to running logged-in windows when the lock screen is 220 // want events to be sent to running logged-in windows when the lock screen is
221 // displayed. 221 // displayed.
222 void set_stops_event_propagation(bool stops_event_propagation) { 222 void set_stops_event_propagation(bool stops_event_propagation) {
223 stops_event_propagation_ = stops_event_propagation; 223 stops_event_propagation_ = stops_event_propagation;
224 } 224 }
225 225
226 void set_ignore_events(bool ignore_events) { ignore_events_ = ignore_events; } 226 void set_ignore_events(bool ignore_events) { ignore_events_ = ignore_events; }
227 227
228 // When non-zero insets the window's bounds by |inset| when performing hit
229 // tests for event handling. Pass a negative value for |inset| to respond to
230 // events that occur slightly outside a window's bounds.
231 void set_hit_test_bounds_inset(int inset) { hit_test_bounds_inset_ = inset; }
232 int hit_test_bounds_inset() const { return hit_test_bounds_inset_; }
233
228 // Returns true if the |point_in_root| in root window's coordinate falls 234 // Returns true if the |point_in_root| in root window's coordinate falls
229 // within this window's bounds. Returns false if the window is detached 235 // within this window's bounds. Returns false if the window is detached
230 // from root window. 236 // from root window.
231 bool ContainsPointInRoot(const gfx::Point& point_in_root); 237 bool ContainsPointInRoot(const gfx::Point& point_in_root);
232 238
233 // Returns true if relative-to-this-Window's-origin |local_point| falls 239 // Returns true if relative-to-this-Window's-origin |local_point| falls
234 // within this Window's bounds. 240 // within this Window's bounds.
235 bool ContainsPoint(const gfx::Point& local_point); 241 bool ContainsPoint(const gfx::Point& local_point);
236 242
237 // Returns true if the mouse pointer at relative-to-this-Window's-origin 243 // Returns true if the mouse pointer at relative-to-this-Window's-origin
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 410
405 void* user_data_; 411 void* user_data_;
406 412
407 // When true, events are not sent to windows behind this one in the z-order, 413 // When true, events are not sent to windows behind this one in the z-order,
408 // provided this window has children. See set_stops_event_propagation(). 414 // provided this window has children. See set_stops_event_propagation().
409 bool stops_event_propagation_; 415 bool stops_event_propagation_;
410 416
411 // Makes the window pass all events through to any windows behind it. 417 // Makes the window pass all events through to any windows behind it.
412 bool ignore_events_; 418 bool ignore_events_;
413 419
420 // Inset the window bounds by this amount when doing hit testing for events.
421 int hit_test_bounds_inset_;
422
414 ObserverList<WindowObserver> observers_; 423 ObserverList<WindowObserver> observers_;
415 424
416 std::map<const void*, intptr_t> prop_map_; 425 std::map<const void*, intptr_t> prop_map_;
417 426
418 DISALLOW_COPY_AND_ASSIGN(Window); 427 DISALLOW_COPY_AND_ASSIGN(Window);
419 }; 428 };
420 429
421 } // namespace aura 430 } // namespace aura
422 431
423 #endif // UI_AURA_WINDOW_H_ 432 #endif // UI_AURA_WINDOW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698