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

Side by Side Diff: ash/wm/window_mirror_view.h

Issue 2254733003: Add ui::LayerObserver and use it to update Alt+Tab previews as needed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix for other test Created 4 years, 3 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/wm/drag_window_controller.cc ('k') | ash/wm/window_mirror_view.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 2016 The Chromium Authors. All rights reserved. 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 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 ASH_WM_WINDOW_MIRROR_VIEW_H_ 5 #ifndef ASH_WM_WINDOW_MIRROR_VIEW_H_
6 #define ASH_WM_WINDOW_MIRROR_VIEW_H_ 6 #define ASH_WM_WINDOW_MIRROR_VIEW_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 18 matching lines...) Expand all
29 explicit WindowMirrorView(WmWindowAura* window); 29 explicit WindowMirrorView(WmWindowAura* window);
30 ~WindowMirrorView() override; 30 ~WindowMirrorView() override;
31 31
32 // views::View: 32 // views::View:
33 gfx::Size GetPreferredSize() const override; 33 gfx::Size GetPreferredSize() const override;
34 void Layout() override; 34 void Layout() override;
35 bool GetNeedsNotificationWhenVisibleBoundsChange() const override; 35 bool GetNeedsNotificationWhenVisibleBoundsChange() const override;
36 void OnVisibleBoundsChanged() override; 36 void OnVisibleBoundsChanged() override;
37 37
38 // ::wm::LayerDelegateFactory: 38 // ::wm::LayerDelegateFactory:
39 ui::LayerDelegate* CreateDelegate(ui::LayerDelegate* delegate) override; 39 ui::LayerDelegate* CreateDelegate(ui::Layer* new_layer,
40 ui::Layer* layer) override;
40 41
41 private: 42 private:
42 void InitLayerOwner(); 43 void InitLayerOwner();
43 44
44 // Gets the root of the layer tree that was lifted from |target_| (and is now 45 // Gets the root of the layer tree that was lifted from |target_| (and is now
45 // a child of |this->layer()|). 46 // a child of |this->layer()|).
46 ui::Layer* GetMirrorLayer(); 47 ui::Layer* GetMirrorLayer();
47 48
48 // Calculates the bounds of the client area of the Window in the widget 49 // Calculates the bounds of the client area of the Window in the widget
49 // coordinate space. 50 // coordinate space.
50 gfx::Rect GetClientAreaBounds() const; 51 gfx::Rect GetClientAreaBounds() const;
51 52
52 // The original window that is being represented by |this|. 53 // The original window that is being represented by |this|.
53 WmWindowAura* target_; 54 WmWindowAura* target_;
54 55
55 // Retains ownership of the mirror layer tree. This is lazily initialized 56 // Retains ownership of the mirror layer tree. This is lazily initialized
56 // the first time the view becomes visible. 57 // the first time the view becomes visible.
57 std::unique_ptr<ui::LayerTreeOwner> layer_owner_; 58 std::unique_ptr<ui::LayerTreeOwner> layer_owner_;
58 59
59 std::vector<std::unique_ptr<ForwardingLayerDelegate>> delegates_; 60 std::vector<std::unique_ptr<ForwardingLayerDelegate>> delegates_;
60 61
61 DISALLOW_COPY_AND_ASSIGN(WindowMirrorView); 62 DISALLOW_COPY_AND_ASSIGN(WindowMirrorView);
62 }; 63 };
63 64
64 } // namespace wm 65 } // namespace wm
65 } // namespace ash 66 } // namespace ash
66 67
67 #endif // ASH_WM_WINDOW_MIRROR_VIEW_H_ 68 #endif // ASH_WM_WINDOW_MIRROR_VIEW_H_
OLDNEW
« no previous file with comments | « ash/wm/drag_window_controller.cc ('k') | ash/wm/window_mirror_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698