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

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

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

Powered by Google App Engine
This is Rietveld 408576698