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

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

Issue 2736943003: Start to decouple display::Display from ws::PlatformDisplay. (Closed)
Patch Set: Fix comments. Created 3 years, 9 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/platform_display_init_params.cc ('k') | services/ui/ws/test_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/ws/test_utils.h
diff --git a/services/ui/ws/test_utils.h b/services/ui/ws/test_utils.h
index aa0c3ee55b1ac27b218a6a83fc1364190052fa52..22ddee3cbb99ade45c5e89015dca7d90d946d5fb 100644
--- a/services/ui/ws/test_utils.h
+++ b/services/ui/ws/test_utils.h
@@ -55,12 +55,12 @@ class TestScreenManager : public display::ScreenManager {
// returns it. Calls OnDisplayAdded() on delegate.
int64_t AddDisplay();
- // Adds a new display with provided |metrics|, generates a unique display id
+ // Adds a new display with provided |display|, generates a unique display id
// and returns it. Calls OnDisplayAdded() on delegate.
- int64_t AddDisplay(const display::ViewportMetrics& metrics);
+ int64_t AddDisplay(const display::Display& display);
// Calls OnDisplayModified() on delegate.
- void ModifyDisplay(int64_t id, const display::ViewportMetrics& metrics);
+ void ModifyDisplay(const display::Display& display);
// Calls OnDisplayRemoved() on delegate.
void RemoveDisplay(int64_t id);
@@ -278,7 +278,8 @@ class TestPlatformDisplayFactory : public PlatformDisplayFactory {
// PlatformDisplayFactory:
std::unique_ptr<PlatformDisplay> CreatePlatformDisplay(
- const PlatformDisplayInitParams& init_params) override;
+ ServerWindow* root_window,
+ const display::ViewportMetrics& metrics) override;
private:
mojom::Cursor* cursor_storage_;
@@ -659,14 +660,14 @@ class WindowEventTargetingHelper {
// WindowManagerWindowTreeFactory and associated WindowTree for the WM.
void AddWindowManager(WindowServer* window_server, const UserId& user_id);
-// Create a new ViewportMetrics object with specified bounds, size and
-// scale factor. Bounds origin, |origin_x| and |origin_y|, are in DIP and bounds
-// size is computed.
-display::ViewportMetrics MakeViewportMetrics(int origin_x,
- int origin_y,
- int width_pixels,
- int height_pixels,
- float scale_factor);
+// Create a new Display object with specified origin, pixel size and device
+// scale factor. The bounds size is computed based on the pixel size and device
+// scale factor.
+display::Display MakeDisplay(int origin_x,
+ int origin_y,
+ int width_pixels,
+ int height_pixels,
+ float scale_factor);
// Returns the first and only root of |tree|. If |tree| has zero or more than
// one root returns null.
« no previous file with comments | « services/ui/ws/platform_display_init_params.cc ('k') | services/ui/ws/test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698