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

Side by Side Diff: ash/mus/bridge/wm_window_mus.h

Issue 2625873007: Promotes WmWindowMus functions to WmWindowAura and nukes WmWindowMus (Closed)
Patch Set: merge Created 3 years, 11 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/mus/bridge/wm_shell_mus.cc ('k') | ash/mus/bridge/wm_window_mus.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_MUS_BRIDGE_WM_WINDOW_MUS_H_
6 #define ASH_MUS_BRIDGE_WM_WINDOW_MUS_H_
7
8 #include <memory>
9
10 #include "ash/aura/wm_window_aura.h"
11 #include "base/macros.h"
12
13 namespace aura {
14 class Window;
15 }
16
17 namespace views {
18 class Widget;
19 }
20
21 namespace ash {
22 namespace mus {
23
24 // WmWindow implementation for mus.
25 //
26 // WmWindowMus is tied to the life of the underlying aura::Window (it is stored
27 // as an owned property).
28 class WmWindowMus : public WmWindowAura {
29 public:
30 explicit WmWindowMus(aura::Window* window);
31 // NOTE: this class is owned by the corresponding window. You shouldn't delete
32 // TODO(sky): friend deleter and make private.
33 ~WmWindowMus() override;
34
35 // Returns a WmWindow for an aura::Window, creating if necessary.
36 static WmWindowMus* Get(aura::Window* window) {
37 return const_cast<WmWindowMus*>(
38 Get(const_cast<const aura::Window*>(window)));
39 }
40 static const WmWindowMus* Get(const aura::Window* window);
41
42 static WmWindowMus* Get(views::Widget* widget);
43
44 static WmWindowMus* AsWmWindowMus(WmWindow* window) {
45 return static_cast<WmWindowMus*>(window);
46 }
47 static const WmWindowMus* AsWmWindowMus(const WmWindow* window) {
48 return static_cast<const WmWindowMus*>(window);
49 }
50
51 // Returns true if this window is considered a shell window container.
52 bool IsContainer() const;
53
54 // WmWindow:
55 WmShell* GetShell() const override;
56 void CloseWidget() override;
57 void AddLimitedPreTargetHandler(ui::EventHandler* handler) override;
58
59 private:
60 DISALLOW_COPY_AND_ASSIGN(WmWindowMus);
61 };
62
63 } // namespace mus
64 } // namespace ash
65
66 #endif // ASH_MUS_BRIDGE_WM_WINDOW_MUS_H_
OLDNEW
« no previous file with comments | « ash/mus/bridge/wm_shell_mus.cc ('k') | ash/mus/bridge/wm_window_mus.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698