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

Side by Side Diff: services/ui/public/cpp/surface_id_handler.h

Issue 2414683003: Mus+Ash: propagate Surface ID to parents (Closed)
Patch Set: Addressed sky's comments 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef SERVICES_UI_PUBLIC_CPP_SURFACE_ID_HANDLER_H_
6 #define SERVICES_UI_PUBLIC_CPP_SURFACE_ID_HANDLER_H_
7
8 #include "cc/surfaces/surface_id.h"
9 #include "cc/surfaces/surface_sequence.h"
10 #include "ui/gfx/geometry/size.h"
11
12 namespace ui {
13
14 class Window;
15
16 struct SurfaceInfo {
sky 2016/10/14 22:44:36 Please add a description.
Fady Samuel 2016/10/14 23:09:50 Done.
17 cc::SurfaceId surface_id;
18 cc::SurfaceSequence surface_sequence;
19 gfx::Size frame_size;
20 float device_scale_factor;
21 };
22
23 class SurfaceIdHandler {
24 public:
25 // Called when a child window allocates a new surface ID.
26 // If the handler wishes to retain ownership of the |surface_info|,
27 // it can move it. If a child's surface has been cleared then
28 // |surface_info| will refer to a null pointer.
29 virtual void OnChildWindowSurfaceChanged(
30 Window* window,
31 std::unique_ptr<SurfaceInfo>* surface_info) = 0;
32 };
33
34 } // namespace ui
35
36 #endif // SERVICES_UI_PUBLIC_CPP_SURFACE_ID_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698