Chromium Code Reviews| 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..d9f05e898bfd4a1d258562138aa2b27a207a58f1 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; |
| @@ -162,6 +163,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 +314,10 @@ class Window { |
| void LocalSetPredefinedCursor(mojom::Cursor cursor_id); |
| void LocalSetSharedProperty(const std::string& name, |
| const std::vector<uint8_t>* data); |
| + void LocalSetSurfaceId(const cc::SurfaceId& surface_id, |
| + const cc::SurfaceSequence& surface_sequence, |
| + const gfx::Size& frame_size, |
| + float device_scale_factor); |
| // Notifies this winodw that its stacking position has changed. |
| void NotifyWindowStackingChanged(); |
| @@ -356,6 +365,7 @@ class Window { |
| base::ObserverList<WindowObserver> observers_; |
| InputEventHandler* input_event_handler_; |
| + SurfaceIdHandler* surface_id_handler_; |
| gfx::Rect bounds_; |
| gfx::Insets client_area_; |
| @@ -393,6 +403,14 @@ class Window { |
| std::map<const void*, Value> prop_map_; |
| + struct SurfaceInfo { |
|
sky
2016/10/14 20:55:46
I think this code would be clearer if you passed a
Fady Samuel
2016/10/14 21:32:48
Done.
|
| + cc::SurfaceId surface_id; |
| + cc::SurfaceSequence surface_sequence; |
| + gfx::Size frame_size; |
| + float device_scale_factor; |
| + }; |
| + SurfaceInfo surface_info_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(Window); |
| }; |