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

Unified Diff: services/ui/public/cpp/window.h

Issue 2414683003: Mus+Ash: propagate Surface ID to parents (Closed)
Patch Set: updated comment Created 4 years, 2 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/public/cpp/window.h
diff --git a/services/ui/public/cpp/window.h b/services/ui/public/cpp/window.h
index af2aae43276df0a635ac536d80c230c204e35ead..2e15b5e98c4c171b48e2fdc052384056d0792eb8 100644
--- a/services/ui/public/cpp/window.h
+++ b/services/ui/public/cpp/window.h
@@ -27,6 +27,7 @@ namespace ui {
class InputEventHandler;
class ServiceProviderImpl;
+class SurfaceIdHandler;
class WindowObserver;
class WindowSurface;
class WindowSurfaceBinding;
@@ -55,6 +56,13 @@ class Window {
using PropertyDeallocator = void (*)(int64_t value);
using SharedProperties = std::map<std::string, std::vector<uint8_t>>;
+ struct SurfaceInfo {
+ cc::SurfaceId surface_id;
+ cc::SurfaceSequence surface_sequence;
+ gfx::Size frame_size;
+ float device_scale_factor;
+ };
+
// Destroys this window and all its children. Destruction is allowed for
// windows that were created by this connection, or the roots. For windows
// from other connections (except the roots), Destroy() does nothing. If the
@@ -162,6 +170,10 @@ class Window {
input_event_handler_ = input_event_handler;
}
+ void set_surface_id_handler(SurfaceIdHandler* surface_id_handler) {
+ surface_id_handler_ = surface_id_handler;
+ }
+
// Observation.
void AddObserver(WindowObserver* observer);
void RemoveObserver(WindowObserver* observer);
@@ -309,6 +321,7 @@ class Window {
void LocalSetPredefinedCursor(mojom::Cursor cursor_id);
void LocalSetSharedProperty(const std::string& name,
const std::vector<uint8_t>* data);
+ void LocalSetSurfaceId(std::unique_ptr<SurfaceInfo> surface_info);
// Notifies this winodw that its stacking position has changed.
void NotifyWindowStackingChanged();
@@ -356,6 +369,7 @@ class Window {
base::ObserverList<WindowObserver> observers_;
InputEventHandler* input_event_handler_;
+ SurfaceIdHandler* surface_id_handler_;
gfx::Rect bounds_;
gfx::Insets client_area_;
@@ -393,6 +407,8 @@ class Window {
std::map<const void*, Value> prop_map_;
+ std::unique_ptr<SurfaceInfo> surface_info_;
+
DISALLOW_COPY_AND_ASSIGN(Window);
};

Powered by Google App Engine
This is Rietveld 408576698