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

Unified Diff: services/ui/ws/platform_display.h

Issue 2230963003: Fix window/display bounds with multiple windows in mus. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes. Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « services/ui/ws/display.cc ('k') | services/ui/ws/platform_display.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_;
« no previous file with comments | « services/ui/ws/display.cc ('k') | services/ui/ws/platform_display.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698