OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #include "base/macros.h" | |
6 #include "ui/compositor/layer_delegate.h" | |
7 | |
8 namespace ui { | |
9 class Layer; | |
10 } | |
11 | |
12 namespace ash { | |
13 | |
14 class WmWindow; | |
15 | |
16 // A layer delegate to paint the content of the recreated layers by delegating | |
17 // the paint request to the original delegate. It checks if the orignal delegate | |
Daniel Erat
2016/07/06 22:04:47
nit: s/orignal/original/
Evan Stade
2016/07/06 23:02:59
Done.
| |
18 // is still valid by traversing the original layers. | |
19 class ForwardingLayerDelegate : public ui::LayerDelegate { | |
20 public: | |
21 ForwardingLayerDelegate(WmWindow* original_window, | |
22 ui::LayerDelegate* delegate); | |
23 ~ForwardingLayerDelegate() override; | |
24 | |
25 private: | |
26 // ui:LayerDelegate: | |
27 void OnPaintLayer(const ui::PaintContext& context) override; | |
28 void OnDelegatedFrameDamage(const gfx::Rect& damage_rect_in_dip) override; | |
29 void OnDeviceScaleFactorChanged(float device_scale_factor) override; | |
30 base::Closure PrepareForLayerBoundsChange() override; | |
31 | |
32 bool IsDelegateValid(ui::Layer* layer); | |
33 | |
34 WmWindow* original_window_; | |
35 ui::LayerDelegate* original_delegate_; | |
36 | |
37 DISALLOW_COPY_AND_ASSIGN(ForwardingLayerDelegate); | |
38 }; | |
39 | |
40 } // namespace ash | |
OLD | NEW |