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 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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. | |
475 bool ContainsMouse(); | |
476 | |
477 // Returns the first ancestor (starting at |this|) with a layer. |offset| is | 474 // 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| | 475 // set to the offset from |this| to the first ancestor with a layer. |offset| |
479 // may be NULL. | 476 // may be NULL. |
480 Window* GetAncestorWithLayer(gfx::Vector2d* offset) { | 477 Window* GetAncestorWithLayer(gfx::Vector2d* offset) { |
481 return const_cast<Window*>( | 478 return const_cast<Window*>( |
482 const_cast<const Window*>(this)->GetAncestorWithLayer(offset)); | 479 const_cast<const Window*>(this)->GetAncestorWithLayer(offset)); |
483 } | 480 } |
484 const Window* GetAncestorWithLayer(gfx::Vector2d* offset) const; | 481 const Window* GetAncestorWithLayer(gfx::Vector2d* offset) const; |
485 | 482 |
486 // Bounds of this window relative to the parent. This is cached as the bounds | 483 // Bounds of this window relative to the parent. This is cached as the bounds |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
541 }; | 538 }; |
542 | 539 |
543 std::map<const void*, Value> prop_map_; | 540 std::map<const void*, Value> prop_map_; |
544 | 541 |
545 DISALLOW_COPY_AND_ASSIGN(Window); | 542 DISALLOW_COPY_AND_ASSIGN(Window); |
546 }; | 543 }; |
547 | 544 |
548 } // namespace aura | 545 } // namespace aura |
549 | 546 |
550 #endif // UI_AURA_WINDOW_H_ | 547 #endif // UI_AURA_WINDOW_H_ |
OLD | NEW |