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

Side by Side Diff: ui/compositor/layer_delegate.h

Issue 2484863005: ui: Cleanup class/struct forward declarations (Closed)
Patch Set: Fix another conflict Created 4 years, 1 month 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/compositor/layer_animator.h ('k') | ui/compositor/paint_context.h » ('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_COMPOSITOR_LAYER_DELEGATE_H_ 5 #ifndef UI_COMPOSITOR_LAYER_DELEGATE_H_
6 #define UI_COMPOSITOR_LAYER_DELEGATE_H_ 6 #define UI_COMPOSITOR_LAYER_DELEGATE_H_
7 7
8 #include "ui/compositor/compositor_export.h" 8 #include "ui/compositor/compositor_export.h"
9 9
10 namespace gfx { 10 namespace gfx {
11 class Canvas;
12 class Rect; 11 class Rect;
13 } 12 }
14 13
15 namespace ui { 14 namespace ui {
16 class PaintContext; 15 class PaintContext;
17 16
18 // A delegate interface implemented by an object that renders to a Layer. 17 // A delegate interface implemented by an object that renders to a Layer.
19 class COMPOSITOR_EXPORT LayerDelegate { 18 class COMPOSITOR_EXPORT LayerDelegate {
20 public: 19 public:
21 // Paint content for the layer to the specified context. 20 // Paint content for the layer to the specified context.
22 virtual void OnPaintLayer(const PaintContext& context) = 0; 21 virtual void OnPaintLayer(const PaintContext& context) = 0;
23 22
24 // A notification that this layer has had a delegated frame swap and 23 // A notification that this layer has had a delegated frame swap and
25 // will be repainted. 24 // will be repainted.
26 virtual void OnDelegatedFrameDamage(const gfx::Rect& damage_rect_in_dip) = 0; 25 virtual void OnDelegatedFrameDamage(const gfx::Rect& damage_rect_in_dip) = 0;
27 26
28 // Called when the layer's device scale factor has changed. 27 // Called when the layer's device scale factor has changed.
29 virtual void OnDeviceScaleFactorChanged(float device_scale_factor) = 0; 28 virtual void OnDeviceScaleFactorChanged(float device_scale_factor) = 0;
30 29
31 // Invoked when the bounds have changed. 30 // Invoked when the bounds have changed.
32 virtual void OnLayerBoundsChanged(const gfx::Rect& old_bounds); 31 virtual void OnLayerBoundsChanged(const gfx::Rect& old_bounds);
33 32
34 protected: 33 protected:
35 virtual ~LayerDelegate() {} 34 virtual ~LayerDelegate() {}
36 }; 35 };
37 36
38 } // namespace ui 37 } // namespace ui
39 38
40 #endif // UI_COMPOSITOR_LAYER_DELEGATE_H_ 39 #endif // UI_COMPOSITOR_LAYER_DELEGATE_H_
OLDNEW
« no previous file with comments | « ui/compositor/layer_animator.h ('k') | ui/compositor/paint_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698