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" | |
sadrul
2016/07/13 18:38:07
include guards
Evan Stade
2016/07/13 19:31:56
Done.
| |
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 namespace wm { | |
17 | |
18 // A layer delegate to paint the content of a recreated layer by delegating | |
19 // the paint request to the original delegate. It checks if the original | |
20 // delegate is still valid by traversing the original layers. | |
21 class ForwardingLayerDelegate : public ui::LayerDelegate { | |
22 public: | |
23 ForwardingLayerDelegate(WmWindow* original_window, | |
24 ui::LayerDelegate* delegate); | |
25 ~ForwardingLayerDelegate() override; | |
26 | |
27 private: | |
28 // ui:LayerDelegate: | |
29 void OnPaintLayer(const ui::PaintContext& context) override; | |
30 void OnDelegatedFrameDamage(const gfx::Rect& damage_rect_in_dip) override; | |
31 void OnDeviceScaleFactorChanged(float device_scale_factor) override; | |
32 base::Closure PrepareForLayerBoundsChange() override; | |
33 | |
34 bool IsDelegateValid(ui::Layer* layer); | |
sadrul
2016/07/13 18:38:07
non-overrides before override
This could be a con
Evan Stade
2016/07/13 19:31:56
Done.
| |
35 | |
36 WmWindow* original_window_; | |
37 ui::LayerDelegate* original_delegate_; | |
38 | |
39 DISALLOW_COPY_AND_ASSIGN(ForwardingLayerDelegate); | |
40 }; | |
41 | |
42 } // namespace wm | |
43 } // namespace ash | |
OLD | NEW |