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

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: 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
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..e3b185be4b8a12c4aa2275bf08704d6d8721dd7a 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 diplay is (1800, 0)
sky 2016/08/10 22:15:59 diplay->display
kylechar 2016/08/11 15:00:37 Done.
+ // 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_;

Powered by Google App Engine
This is Rietveld 408576698