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

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

Issue 2157393002: Moves WindowCycleList/Controller to ash/common (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Feedback and std::move 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/wm/window_cycle_list.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
(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_WM_WINDOW_MIRROR_VIEW_H_
6 #define ASH_WM_WINDOW_MIRROR_VIEW_H_
7
8 #include <memory>
9 #include <vector>
10
11 #include "ash/ash_export.h"
12 #include "base/macros.h"
13 #include "ui/views/view.h"
14 #include "ui/wm/core/window_util.h"
15
16 namespace ash {
17
18 class WmWindowAura;
19
20 namespace wm {
21
22 class ForwardingLayerDelegate;
23
24 // A view that mirrors a single window. Layers are lifted from the underlying
25 // window (which gets new ones in their place). New paint calls, if any, are
26 // forwarded to the underlying window.
27 class WindowMirrorView : public views::View, public ::wm::LayerDelegateFactory {
28 public:
29 explicit WindowMirrorView(WmWindowAura* window);
30 ~WindowMirrorView() override;
31
32 void Init();
33
34 // views::View:
35 gfx::Size GetPreferredSize() const override;
36 void Layout() override;
37
38 // ::wm::LayerDelegateFactory:
39 ui::LayerDelegate* CreateDelegate(ui::LayerDelegate* delegate) override;
40
41 private:
42 // Gets the root of the layer tree that was lifted from |target_| (and is now
43 // a child of |this->layer()|).
44 ui::Layer* GetMirrorLayer();
45
46 // The original window that is being represented by |this|.
47 WmWindowAura* target_;
48
49 // Retains ownership of the mirror layer tree.
50 std::unique_ptr<ui::LayerTreeOwner> layer_owner_;
51
52 std::vector<std::unique_ptr<ForwardingLayerDelegate>> delegates_;
53
54 DISALLOW_COPY_AND_ASSIGN(WindowMirrorView);
55 };
56
57 } // namespace wm
58 } // namespace ash
59
60 #endif // ASH_WM_WINDOW_MIRROR_VIEW_H_
OLDNEW
« no previous file with comments | « ash/wm/window_cycle_list.cc ('k') | ash/wm/window_mirror_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698