| Index: services/ui/ws/platform_display.h
|
| diff --git a/services/ui/ws/platform_display.h b/services/ui/ws/platform_display.h
|
| index f967a2480831b0c6450693e877b8b718107cf018..2209d4503956581b241ed5420caabade84d338c3 100644
|
| --- a/services/ui/ws/platform_display.h
|
| +++ b/services/ui/ws/platform_display.h
|
| @@ -15,6 +15,7 @@
|
| #include "base/memory/weak_ptr.h"
|
| #include "base/strings/string16.h"
|
| #include "build/build_config.h"
|
| +#include "services/ui/display/platform_screen.h"
|
| #include "services/ui/public/interfaces/window_manager.mojom.h"
|
| #include "services/ui/public/interfaces/window_manager_constants.mojom.h"
|
| #include "services/ui/public/interfaces/window_tree.mojom.h"
|
| @@ -89,6 +90,8 @@ class PlatformDisplay {
|
|
|
| virtual gfx::Rect GetBounds() const = 0;
|
|
|
| + virtual bool IsPrimaryDisplay() const = 0;
|
| +
|
| // Overrides factory for testing. Default (NULL) value indicates regular
|
| // (non-test) environment.
|
| static void set_factory_for_testing(PlatformDisplayFactory* factory) {
|
| @@ -127,10 +130,17 @@ class DefaultPlatformDisplay : public PlatformDisplay,
|
| void RequestCopyOfOutput(
|
| std::unique_ptr<cc::CopyOutputRequest> output_request) override;
|
| gfx::Rect GetBounds() const override;
|
| + bool IsPrimaryDisplay() const override;
|
|
|
| private:
|
| void UpdateMetrics(const gfx::Rect& bounds, float device_scale_factor);
|
|
|
| + // Update the root_location of located events to be relative to the origin
|
| + // of this display. For example, if the origin of this display is (1800, 0)
|
| + // and the location of the event is (100, 200) then the root_location will be
|
| + // updated to be (1900, 200).
|
| + void UpdateEventRootLocation(ui::LocatedEvent* event);
|
| +
|
| // ui::PlatformWindowDelegate:
|
| void OnBoundsChanged(const gfx::Rect& new_bounds) override;
|
| void OnDamageRect(const gfx::Rect& damaged_region) override;
|
| @@ -151,6 +161,7 @@ class DefaultPlatformDisplay : public PlatformDisplay,
|
| const ViewportMetrics& GetViewportMetrics() override;
|
|
|
| int64_t id_;
|
| + display::PlatformScreen* platform_screen_;
|
|
|
| #if !defined(OS_ANDROID)
|
| std::unique_ptr<ui::CursorLoader> cursor_loader_;
|
|
|