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

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

Issue 2189893004: Unify display ids between Display and PlatformDisplay. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move id into PlatformDisplay and fix tests. Created 4 years, 5 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 d7bc2f6033afbc69c355d9835c2638b4eff30fb3..4b4831d07a746fdc48eefa65be96cc28a8516007 100644
--- a/services/ui/ws/platform_display.h
+++ b/services/ui/ws/platform_display.h
@@ -52,10 +52,13 @@ class ServerWindow;
// PlatformDisplay is used to connect the root ServerWindow to a display.
class PlatformDisplay {
public:
+ PlatformDisplay(int64_t id);
msw 2016/07/28 19:01:02 Oh dang; I saw |set_factory_for_testing| and thoug
kylechar 2016/07/28 19:20:16 I think sky is OOO but I'll talk with sadrul or rj
virtual ~PlatformDisplay() {}
static PlatformDisplay* Create(const PlatformDisplayInitParams& init_params);
+ int64_t id() const { return id_; }
+
virtual void Init(PlatformDisplayDelegate* delegate) = 0;
// Schedules a paint for the specified region in the coordinates of |window|.
@@ -85,8 +88,6 @@ class PlatformDisplay {
virtual void RequestCopyOfOutput(
std::unique_ptr<cc::CopyOutputRequest> output_request) = 0;
- virtual int64_t GetDisplayId() const = 0;
-
virtual gfx::Rect GetBounds() const = 0;
// Overrides factory for testing. Default (NULL) value indicates regular
@@ -96,6 +97,8 @@ class PlatformDisplay {
}
private:
+ int64_t id_;
+
// Static factory instance (always NULL for non-test).
static PlatformDisplayFactory* factory_;
};
msw 2016/07/28 19:01:02 nit: DISALLOW_COPY_AND_ASSIGN(PlatformDisplay); if
kylechar 2016/07/28 19:20:16 Done.
@@ -125,7 +128,6 @@ class DefaultPlatformDisplay : public PlatformDisplay,
bool IsFramePending() const override;
void RequestCopyOfOutput(
std::unique_ptr<cc::CopyOutputRequest> output_request) override;
- int64_t GetDisplayId() const override;
gfx::Rect GetBounds() const override;
private:
@@ -150,8 +152,6 @@ class DefaultPlatformDisplay : public PlatformDisplay,
bool IsInHighContrastMode() override;
const ViewportMetrics& GetViewportMetrics() override;
- int64_t display_id_;
-
#if !defined(OS_ANDROID)
std::unique_ptr<ui::CursorLoader> cursor_loader_;
#endif

Powered by Google App Engine
This is Rietveld 408576698