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

Side by Side Diff: services/ui/ws/server_window_surface.h

Issue 2140783002: services/ui: Detect when a video is playing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef SERVICES_UI_WS_SERVER_WINDOW_SURFACE_H_ 5 #ifndef SERVICES_UI_WS_SERVER_WINDOW_SURFACE_H_
6 #define SERVICES_UI_WS_SERVER_WINDOW_SURFACE_H_ 6 #define SERVICES_UI_WS_SERVER_WINDOW_SURFACE_H_
7 7
8 #include <set> 8 #include <set>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 23 matching lines...) Expand all
34 ServerWindowSurface(ServerWindowSurfaceManager* manager, 34 ServerWindowSurface(ServerWindowSurfaceManager* manager,
35 mojo::InterfaceRequest<mojom::Surface> request, 35 mojo::InterfaceRequest<mojom::Surface> request,
36 mojom::SurfaceClientPtr client); 36 mojom::SurfaceClientPtr client);
37 37
38 ~ServerWindowSurface() override; 38 ~ServerWindowSurface() override;
39 39
40 const gfx::Size& last_submitted_frame_size() const { 40 const gfx::Size& last_submitted_frame_size() const {
41 return last_submitted_frame_size_; 41 return last_submitted_frame_size_;
42 } 42 }
43 43
44 bool may_contain_video() const { return may_contain_video_; }
45
44 // mojom::Surface: 46 // mojom::Surface:
45 void SubmitCompositorFrame( 47 void SubmitCompositorFrame(
46 cc::CompositorFrame frame, 48 cc::CompositorFrame frame,
47 const SubmitCompositorFrameCallback& callback) override; 49 const SubmitCompositorFrameCallback& callback) override;
48 50
49 const cc::SurfaceId& id() const { return surface_id_; } 51 const cc::SurfaceId& id() const { return surface_id_; }
50 52
51 // Destroys old surfaces that have been outdated by a new surface. 53 // Destroys old surfaces that have been outdated by a new surface.
52 void DestroySurfacesScheduledForDestruction(); 54 void DestroySurfacesScheduledForDestruction();
53 55
(...skipping 11 matching lines...) Expand all
65 cc::SurfaceId surface_id_; 67 cc::SurfaceId surface_id_;
66 cc::SurfaceIdAllocator surface_id_allocator_; 68 cc::SurfaceIdAllocator surface_id_allocator_;
67 cc::SurfaceFactory surface_factory_; 69 cc::SurfaceFactory surface_factory_;
68 70
69 mojom::SurfaceClientPtr client_; 71 mojom::SurfaceClientPtr client_;
70 mojo::Binding<Surface> binding_; 72 mojo::Binding<Surface> binding_;
71 73
72 // Set of surface ids that need to be destroyed. 74 // Set of surface ids that need to be destroyed.
73 std::set<cc::SurfaceId> surfaces_scheduled_for_destruction_; 75 std::set<cc::SurfaceId> surfaces_scheduled_for_destruction_;
74 76
77 bool may_contain_video_ = false;
78
75 DISALLOW_COPY_AND_ASSIGN(ServerWindowSurface); 79 DISALLOW_COPY_AND_ASSIGN(ServerWindowSurface);
76 }; 80 };
77 81
78 } // namespace ws 82 } // namespace ws
79 83
80 } // namespace ui 84 } // namespace ui
81 85
82 #endif // SERVICES_UI_WS_SERVER_WINDOW_SURFACE_H_ 86 #endif // SERVICES_UI_WS_SERVER_WINDOW_SURFACE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698