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

Side by Side Diff: chromecast/base/cast_resource.h

Issue 1531543002: [Chromecast] Adding pause/resume operations to VideoPlaneController. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Modifying comment. Created 5 years 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 CHROMECAST_BASE_CAST_RESOURCE_H_ 5 #ifndef CHROMECAST_BASE_CAST_RESOURCE_H_
6 #define CHROMECAST_BASE_CAST_RESOURCE_H_ 6 #define CHROMECAST_BASE_CAST_RESOURCE_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 9
10 namespace chromecast { 10 namespace chromecast {
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 // returned, Client will remove the resource from its watching 46 // returned, Client will remove the resource from its watching
47 // list. 47 // list.
48 virtual void OnResourceReleased(CastResource* cast_resource, 48 virtual void OnResourceReleased(CastResource* cast_resource,
49 Resource remain) = 0; 49 Resource remain) = 0;
50 50
51 protected: 51 protected:
52 virtual ~Client() {} 52 virtual ~Client() {}
53 }; 53 };
54 54
55 void SetCastResourceClient(Client* client); 55 void SetCastResourceClient(Client* client);
56 // Called to initialize resources after OEM has granted them, and before
57 // they start getting used by consumers. Implementation must be synchronous
58 // since consumers will start using the resource immediately afterwards.
59 virtual void InitializeResource(Resource resource) = 0;
derekjchow1 2015/12/15 22:40:35 What thread does this get called on? If this gets
yucliu1 2015/12/15 23:05:58 Probably we can make a contract here: InitializeRe
esum 2015/12/17 08:28:12 Agreed it should be made asynchronous, but I would
halliwell 2015/12/17 14:46:31 Calling VideoPlane synchronously is fine. I'm ok
56 // Called to release resources. Implementation should call 60 // Called to release resources. Implementation should call
57 // Client::OnResourceReleased when resource is released on its side. 61 // Client::OnResourceReleased when resource is released on its side.
58 virtual void ReleaseResource(Resource resource) = 0; 62 virtual void ReleaseResource(Resource resource) = 0;
59 63
60 protected: 64 protected:
61 CastResource() : client_(nullptr) {} 65 CastResource() : client_(nullptr) {}
62 virtual ~CastResource() {} 66 virtual ~CastResource() {}
63 67
64 void NotifyResourceAcquired(); 68 void NotifyResourceAcquired();
65 void NotifyResourceReleased(Resource remain); 69 void NotifyResourceReleased(Resource remain);
66 70
67 private: 71 private:
68 Client* client_; 72 Client* client_;
69 73
70 DISALLOW_COPY_AND_ASSIGN(CastResource); 74 DISALLOW_COPY_AND_ASSIGN(CastResource);
71 }; 75 };
72 76
73 } // namespace chromecast 77 } // namespace chromecast
74 78
75 #endif 79 #endif
OLDNEW
« no previous file with comments | « no previous file | chromecast/browser/media/cma_media_pipeline_client.h » ('j') | chromecast/media/base/video_plane_controller.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698