OLD | NEW |
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 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 // NativeWidget::[GS]etNativeWindowProperty use strings as keys, and this is | 305 // NativeWidget::[GS]etNativeWindowProperty use strings as keys, and this is |
306 // difficult to change while retaining compatibility with other platforms. | 306 // difficult to change while retaining compatibility with other platforms. |
307 // TODO(benrg): Find a better solution. | 307 // TODO(benrg): Find a better solution. |
308 void SetNativeWindowProperty(const char* key, void* value); | 308 void SetNativeWindowProperty(const char* key, void* value); |
309 void* GetNativeWindowProperty(const char* key) const; | 309 void* GetNativeWindowProperty(const char* key) const; |
310 | 310 |
311 // Type of a function to delete a property that this window owns. | 311 // Type of a function to delete a property that this window owns. |
312 typedef void (*PropertyDeallocator)(int64 value); | 312 typedef void (*PropertyDeallocator)(int64 value); |
313 | 313 |
314 // Overridden from ui::LayerDelegate: | 314 // Overridden from ui::LayerDelegate: |
315 virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE; | 315 virtual void OnDeviceScaleFactorChanged(float device_scale_factor) override; |
316 | 316 |
317 #if !defined(NDEBUG) | 317 #if !defined(NDEBUG) |
318 // These methods are useful when debugging. | 318 // These methods are useful when debugging. |
319 std::string GetDebugInfo() const; | 319 std::string GetDebugInfo() const; |
320 void PrintWindowHierarchy(int depth) const; | 320 void PrintWindowHierarchy(int depth) const; |
321 #endif | 321 #endif |
322 | 322 |
323 // Returns true if there was state needing to be cleaned up. | 323 // Returns true if there was state needing to be cleaned up. |
324 bool CleanupGestureState(); | 324 bool CleanupGestureState(); |
325 | 325 |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
448 // Notifies this window and its child hierarchy of a transform applied to | 448 // Notifies this window and its child hierarchy of a transform applied to |
449 // |source|. | 449 // |source|. |
450 void NotifyAncestorWindowTransformed(Window* source); | 450 void NotifyAncestorWindowTransformed(Window* source); |
451 | 451 |
452 // Invoked when the bounds of the window changes. This may be invoked directly | 452 // Invoked when the bounds of the window changes. This may be invoked directly |
453 // by us, or from the closure returned by PrepareForLayerBoundsChange() after | 453 // by us, or from the closure returned by PrepareForLayerBoundsChange() after |
454 // the bounds of the layer has changed. |old_bounds| is the previous bounds. | 454 // the bounds of the layer has changed. |old_bounds| is the previous bounds. |
455 void OnWindowBoundsChanged(const gfx::Rect& old_bounds); | 455 void OnWindowBoundsChanged(const gfx::Rect& old_bounds); |
456 | 456 |
457 // Overridden from ui::LayerDelegate: | 457 // Overridden from ui::LayerDelegate: |
458 virtual void OnPaintLayer(gfx::Canvas* canvas) OVERRIDE; | 458 virtual void OnPaintLayer(gfx::Canvas* canvas) override; |
459 virtual void OnDelegatedFrameDamage( | 459 virtual void OnDelegatedFrameDamage( |
460 const gfx::Rect& damage_rect_in_dip) OVERRIDE; | 460 const gfx::Rect& damage_rect_in_dip) override; |
461 virtual base::Closure PrepareForLayerBoundsChange() OVERRIDE; | 461 virtual base::Closure PrepareForLayerBoundsChange() override; |
462 | 462 |
463 // Overridden from ui::EventTarget: | 463 // Overridden from ui::EventTarget: |
464 virtual bool CanAcceptEvent(const ui::Event& event) OVERRIDE; | 464 virtual bool CanAcceptEvent(const ui::Event& event) override; |
465 virtual EventTarget* GetParentTarget() OVERRIDE; | 465 virtual EventTarget* GetParentTarget() override; |
466 virtual scoped_ptr<ui::EventTargetIterator> GetChildIterator() const OVERRIDE; | 466 virtual scoped_ptr<ui::EventTargetIterator> GetChildIterator() const override; |
467 virtual ui::EventTargeter* GetEventTargeter() OVERRIDE; | 467 virtual ui::EventTargeter* GetEventTargeter() override; |
468 virtual void ConvertEventToTarget(ui::EventTarget* target, | 468 virtual void ConvertEventToTarget(ui::EventTarget* target, |
469 ui::LocatedEvent* event) OVERRIDE; | 469 ui::LocatedEvent* event) override; |
470 | 470 |
471 // Updates the layer name based on the window's name and id. | 471 // Updates the layer name based on the window's name and id. |
472 void UpdateLayerName(); | 472 void UpdateLayerName(); |
473 | 473 |
474 // Returns true if the mouse is currently within our bounds. | 474 // Returns true if the mouse is currently within our bounds. |
475 bool ContainsMouse(); | 475 bool ContainsMouse(); |
476 | 476 |
477 // Returns the first ancestor (starting at |this|) with a layer. |offset| is | 477 // Returns the first ancestor (starting at |this|) with a layer. |offset| is |
478 // set to the offset from |this| to the first ancestor with a layer. |offset| | 478 // set to the offset from |this| to the first ancestor with a layer. |offset| |
479 // may be NULL. | 479 // may be NULL. |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
541 }; | 541 }; |
542 | 542 |
543 std::map<const void*, Value> prop_map_; | 543 std::map<const void*, Value> prop_map_; |
544 | 544 |
545 DISALLOW_COPY_AND_ASSIGN(Window); | 545 DISALLOW_COPY_AND_ASSIGN(Window); |
546 }; | 546 }; |
547 | 547 |
548 } // namespace aura | 548 } // namespace aura |
549 | 549 |
550 #endif // UI_AURA_WINDOW_H_ | 550 #endif // UI_AURA_WINDOW_H_ |
OLD | NEW |