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

Side by Side Diff: mash/wm/bridge/wm_root_window_controller_mus.h

Issue 1954933002: Initial cut of ash/wm/common classes for mus (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge to trunk Created 4 years, 7 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 | « mash/wm/bridge/wm_lookup_mus.cc ('k') | mash/wm/bridge/wm_root_window_controller_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 MASH_WM_BRIDGE_WM_ROOT_CONTROLLER_MUS_H_
6 #define MASH_WM_BRIDGE_WM_ROOT_CONTROLLER_MUS_H_
7
8 #include "ash/wm/common/wm_root_window_controller.h"
9 #include "base/macros.h"
10 #include "base/observer_list.h"
11
12 namespace gfx {
13 class Display;
14 }
15
16 namespace mus {
17 class Window;
18 }
19
20 namespace mash {
21 namespace wm {
22
23 class RootWindowController;
24 class WmGlobalsMus;
25 class WmWindowMus;
26
27 // WmRootWindowController implementations for mus.
28 class WmRootWindowControllerMus : public ash::wm::WmRootWindowController {
29 public:
30 WmRootWindowControllerMus(WmGlobalsMus* globals,
31 RootWindowController* root_window_controller);
32 ~WmRootWindowControllerMus() override;
33
34 static WmRootWindowControllerMus* Get(mus::Window* window) {
35 return const_cast<WmRootWindowControllerMus*>(
36 Get(const_cast<const mus::Window*>(window)));
37 }
38 static const WmRootWindowControllerMus* Get(const mus::Window* window);
39
40 RootWindowController* root_window_controller() {
41 return root_window_controller_;
42 }
43
44 // Screen conversion functions.
45 gfx::Point ConvertPointToScreen(const WmWindowMus* source,
46 const gfx::Point& point) const;
47 gfx::Point ConvertPointFromScreen(const WmWindowMus* target,
48 const gfx::Point& point) const;
49
50 const gfx::Display& GetDisplay() const;
51
52 // WmRootWindowController:
53 bool HasShelf() override;
54 ash::wm::WmGlobals* GetGlobals() override;
55 ash::wm::WorkspaceWindowState GetWorkspaceWindowState() override;
56 ash::AlwaysOnTopController* GetAlwaysOnTopController() override;
57 ash::wm::WmShelf* GetShelf() override;
58 ash::wm::WmWindow* GetWindow() override;
59 void ConfigureWidgetInitParamsForContainer(
60 views::Widget* widget,
61 int shell_container_id,
62 views::Widget::InitParams* init_params) override;
63 ash::wm::WmWindow* FindEventTarget(
64 const gfx::Point& location_in_screen) override;
65 void AddObserver(ash::wm::WmRootWindowControllerObserver* observer) override;
66 void RemoveObserver(
67 ash::wm::WmRootWindowControllerObserver* observer) override;
68
69 private:
70 WmGlobalsMus* globals_;
71 RootWindowController* root_window_controller_;
72
73 DISALLOW_COPY_AND_ASSIGN(WmRootWindowControllerMus);
74 };
75
76 } // namespace wm
77 } // namespace mash
78
79 #endif // MASH_WM_BRIDGE_WM_ROOT_CONTROLLER_MUS_H_
OLDNEW
« no previous file with comments | « mash/wm/bridge/wm_lookup_mus.cc ('k') | mash/wm/bridge/wm_root_window_controller_mus.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698