forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathash_window_tree_host_mirroring_unified.h
48 lines (34 loc) · 1.5 KB
/
ash_window_tree_host_mirroring_unified.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef ASH_HOST_ASH_WINDOW_TREE_HOST_MIRRORING_UNIFIED_H_
#define ASH_HOST_ASH_WINDOW_TREE_HOST_MIRRORING_UNIFIED_H_
#include "ash/host/ash_window_tree_host_platform.h"
namespace ash {
class AshWindowTreeHostMirroringDelegate;
// A window tree host for the mirroing displays that constitute the unified
// desktop. This correctly handles coordinates conversion from DIP to pixels and
// vice versa.
class AshWindowTreeHostMirroringUnified : public AshWindowTreeHostPlatform {
public:
AshWindowTreeHostMirroringUnified(
const gfx::Rect& initial_bounds,
int64_t mirroring_display_id,
AshWindowTreeHostMirroringDelegate* delegate);
~AshWindowTreeHostMirroringUnified() override;
// aura::WindowTreeHost:
gfx::Transform GetRootTransformForLocalEventCoordinates() const override;
void ConvertDIPToPixels(gfx::Point* point) const override;
void ConvertPixelsToDIP(gfx::Point* point) const override;
// ash::AshWindowTreeHostPlatform:
void PrepareForShutdown() override;
// ui::PlatformWindowDelegate:
void OnMouseEnter() override;
private:
int64_t mirroring_display_id_;
AshWindowTreeHostMirroringDelegate* delegate_; // Not owned.
bool is_shutting_down_ = false;
DISALLOW_COPY_AND_ASSIGN(AshWindowTreeHostMirroringUnified);
};
} // namespace ash
#endif // ASH_HOST_ASH_WINDOW_TREE_HOST_MIRRORING_UNIFIED_H_