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

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

Issue 2112993002: Factor draw functionality out of DefaultPlatformDisplay into FrameGenerator. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix namespace comments 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
« no previous file with comments | « services/ui/ws/frame_generator.cc ('k') | services/ui/ws/platform_display.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/ws/frame_generator_delegate.h
diff --git a/services/ui/ws/user_id_tracker_observer.h b/services/ui/ws/frame_generator_delegate.h
similarity index 30%
copy from services/ui/ws/user_id_tracker_observer.h
copy to services/ui/ws/frame_generator_delegate.h
index 23d5eae02b77a03c11760e80152534d8b7441511..456bab2e106dc9ff684e1a875a75d8d7b5b15a7d 100644
--- a/services/ui/ws/user_id_tracker_observer.h
+++ b/services/ui/ws/frame_generator_delegate.h
@@ -2,28 +2,36 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef SERVICES_UI_WS_USER_ID_TRACKER_OBSERVER_H_
-#define SERVICES_UI_WS_USER_ID_TRACKER_OBSERVER_H_
+#ifndef SERVICES_UI_WS_FRAME_GENERATOR_DELEGATE_H_
+#define SERVICES_UI_WS_FRAME_GENERATOR_DELEGATE_H_
-#include <stdint.h>
-
-#include "services/ui/ws/user_id.h"
+#include "base/macros.h"
namespace ui {
namespace ws {
-class UserIdTrackerObserver {
+class ServerWindow;
+
+struct ViewportMetrics {
+ gfx::Size size_in_pixels;
+ float device_scale_factor = 0.f;
+};
+
+class FrameGeneratorDelegate {
public:
- virtual void OnActiveUserIdChanged(const UserId& previously_active_id,
- const UserId& active_id) {}
- virtual void OnUserIdAdded(const UserId& id) {}
- virtual void OnUserIdRemoved(const UserId& id) {}
+ // Returns the root window of the display.
+ virtual ServerWindow* GetRootWindow() = 0;
+
+ // Called when a compositor frame is finished drawing.
+ virtual void OnCompositorFrameDrawn() = 0;
+
+ virtual const ViewportMetrics& GetViewportMetrics() = 0;
protected:
- virtual ~UserIdTrackerObserver() {}
+ virtual ~FrameGeneratorDelegate() {}
};
} // namespace ws
} // namespace ui
-#endif // SERVICES_UI_WS_USER_ID_TRACKER_OBSERVER_H_
+#endif // SERVICES_UI_WS_FRAME_GENERATOR_DELEGATE_H_
« no previous file with comments | « services/ui/ws/frame_generator.cc ('k') | services/ui/ws/platform_display.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698