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

Side by Side Diff: ash/common/wm/forwarding_layer_delegate.h

Issue 2129773002: [CrOS] Initial rough cut of alt-tab window cycling UI. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: function rename Created 4 years, 5 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 | « ash/common/ash_switches.cc ('k') | ash/common/wm/forwarding_layer_delegate.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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 #ifndef ASH_COMMON_WM_FORWARDING_LAYER_DELEGATE_H_
6 #define ASH_COMMON_WM_FORWARDING_LAYER_DELEGATE_H_
7
8 #include "base/macros.h"
9 #include "ui/compositor/layer_delegate.h"
10
11 namespace ui {
12 class Layer;
13 }
14
15 namespace ash {
16
17 class WmWindow;
18
19 namespace wm {
20
21 // A layer delegate to paint the content of a recreated layer by delegating
22 // the paint request to the original delegate. It checks if the original
23 // delegate is still valid by traversing the original layers.
24 class ForwardingLayerDelegate : public ui::LayerDelegate {
25 public:
26 ForwardingLayerDelegate(WmWindow* original_window,
27 ui::LayerDelegate* delegate);
28 ~ForwardingLayerDelegate() override;
29
30 private:
31 bool IsDelegateValid(ui::Layer* layer) const;
32
33 // ui:LayerDelegate:
34 void OnPaintLayer(const ui::PaintContext& context) override;
35 void OnDelegatedFrameDamage(const gfx::Rect& damage_rect_in_dip) override;
36 void OnDeviceScaleFactorChanged(float device_scale_factor) override;
37 base::Closure PrepareForLayerBoundsChange() override;
38
39 WmWindow* original_window_;
40 ui::LayerDelegate* original_delegate_;
41
42 DISALLOW_COPY_AND_ASSIGN(ForwardingLayerDelegate);
43 };
44
45 } // namespace wm
46 } // namespace ash
47
48 #endif // ASH_COMMON_WM_FORWARDING_LAYER_DELEGATE_H_
OLDNEW
« no previous file with comments | « ash/common/ash_switches.cc ('k') | ash/common/wm/forwarding_layer_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698