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

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: 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 // TODO(esum): We should allow this method to be asynchronous in case an
60 // implementer needs to make expensive calls and doesn't want to block the
61 // UI thread (b/26239576). For now, don't do anything expensive in your
62 // implementation; if you really need to, then this bug has to be resolved.
63 virtual void InitializeResource(Resource resource) = 0;
56 // Called to release resources. Implementation should call 64 // Called to release resources. Implementation should call
57 // Client::OnResourceReleased when resource is released on its side. 65 // Client::OnResourceReleased when resource is released on its side.
58 virtual void ReleaseResource(Resource resource) = 0; 66 virtual void ReleaseResource(Resource resource) = 0;
59 67
60 protected: 68 protected:
61 CastResource() : client_(nullptr) {} 69 CastResource() : client_(nullptr) {}
62 virtual ~CastResource() {} 70 virtual ~CastResource() {}
63 71
64 void NotifyResourceAcquired(); 72 void NotifyResourceAcquired();
65 void NotifyResourceReleased(Resource remain); 73 void NotifyResourceReleased(Resource remain);
66 74
67 private: 75 private:
68 Client* client_; 76 Client* client_;
69 77
70 DISALLOW_COPY_AND_ASSIGN(CastResource); 78 DISALLOW_COPY_AND_ASSIGN(CastResource);
71 }; 79 };
72 80
73 } // namespace chromecast 81 } // namespace chromecast
74 82
75 #endif 83 #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.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698