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 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
362 | 362 |
363 // Updates the visible state of the layer, but does not make visible-state | 363 // Updates the visible state of the layer, but does not make visible-state |
364 // specific changes. Called from Show()/Hide(). | 364 // specific changes. Called from Show()/Hide(). |
365 void SetVisible(bool visible); | 365 void SetVisible(bool visible); |
366 | 366 |
367 // Schedules a paint for the Window's entire bounds. | 367 // Schedules a paint for the Window's entire bounds. |
368 void SchedulePaint(); | 368 void SchedulePaint(); |
369 | 369 |
370 // Asks the delegate to paint the window and invokes PaintLayerlessChildren() | 370 // Asks the delegate to paint the window and invokes PaintLayerlessChildren() |
371 // to paint any children with no layers. | 371 // to paint any children with no layers. |
372 void Paint(gfx::Canvas* canvas); | 372 void Paint(const ui::PaintContext& context); |
373 | 373 |
374 // Paints any layerless children to |canvas|. | 374 // Paints any layerless children to |canvas|. |
375 void PaintLayerlessChildren(gfx::Canvas* canvas); | 375 void PaintLayerlessChildren(const ui::PaintContext& context); |
376 | 376 |
377 // Gets a Window (either this one or a subwindow) containing |local_point|. | 377 // Gets a Window (either this one or a subwindow) containing |local_point|. |
378 // If |return_tightest| is true, returns the tightest-containing (i.e. | 378 // If |return_tightest| is true, returns the tightest-containing (i.e. |
379 // furthest down the hierarchy) Window containing the point; otherwise, | 379 // furthest down the hierarchy) Window containing the point; otherwise, |
380 // returns the loosest. If |for_event_handling| is true, then hit-test masks | 380 // returns the loosest. If |for_event_handling| is true, then hit-test masks |
381 // are honored; otherwise, only bounds checks are performed. | 381 // are honored; otherwise, only bounds checks are performed. |
382 Window* GetWindowForPoint(const gfx::Point& local_point, | 382 Window* GetWindowForPoint(const gfx::Point& local_point, |
383 bool return_tightest, | 383 bool return_tightest, |
384 bool for_event_handling); | 384 bool for_event_handling); |
385 | 385 |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
457 // Notifies this window and its child hierarchy of a transform applied to | 457 // Notifies this window and its child hierarchy of a transform applied to |
458 // |source|. | 458 // |source|. |
459 void NotifyAncestorWindowTransformed(Window* source); | 459 void NotifyAncestorWindowTransformed(Window* source); |
460 | 460 |
461 // Invoked when the bounds of the window changes. This may be invoked directly | 461 // Invoked when the bounds of the window changes. This may be invoked directly |
462 // by us, or from the closure returned by PrepareForLayerBoundsChange() after | 462 // by us, or from the closure returned by PrepareForLayerBoundsChange() after |
463 // the bounds of the layer has changed. |old_bounds| is the previous bounds. | 463 // the bounds of the layer has changed. |old_bounds| is the previous bounds. |
464 void OnWindowBoundsChanged(const gfx::Rect& old_bounds); | 464 void OnWindowBoundsChanged(const gfx::Rect& old_bounds); |
465 | 465 |
466 // Overridden from ui::LayerDelegate: | 466 // Overridden from ui::LayerDelegate: |
467 void OnPaintLayer(gfx::Canvas* canvas) override; | 467 void OnPaintLayer(const ui::PaintContext& context) override; |
468 void OnDelegatedFrameDamage(const gfx::Rect& damage_rect_in_dip) override; | 468 void OnDelegatedFrameDamage(const gfx::Rect& damage_rect_in_dip) override; |
469 base::Closure PrepareForLayerBoundsChange() override; | 469 base::Closure PrepareForLayerBoundsChange() override; |
470 | 470 |
471 // Overridden from ui::EventTarget: | 471 // Overridden from ui::EventTarget: |
472 bool CanAcceptEvent(const ui::Event& event) override; | 472 bool CanAcceptEvent(const ui::Event& event) override; |
473 EventTarget* GetParentTarget() override; | 473 EventTarget* GetParentTarget() override; |
474 scoped_ptr<ui::EventTargetIterator> GetChildIterator() const override; | 474 scoped_ptr<ui::EventTargetIterator> GetChildIterator() const override; |
475 ui::EventTargeter* GetEventTargeter() override; | 475 ui::EventTargeter* GetEventTargeter() override; |
476 void ConvertEventToTarget(ui::EventTarget* target, | 476 void ConvertEventToTarget(ui::EventTarget* target, |
477 ui::LocatedEvent* event) override; | 477 ui::LocatedEvent* event) override; |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
546 }; | 546 }; |
547 | 547 |
548 std::map<const void*, Value> prop_map_; | 548 std::map<const void*, Value> prop_map_; |
549 | 549 |
550 DISALLOW_COPY_AND_ASSIGN(Window); | 550 DISALLOW_COPY_AND_ASSIGN(Window); |
551 }; | 551 }; |
552 | 552 |
553 } // namespace aura | 553 } // namespace aura |
554 | 554 |
555 #endif // UI_AURA_WINDOW_H_ | 555 #endif // UI_AURA_WINDOW_H_ |
OLD | NEW |