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

Side by Side Diff: webkit/renderer/media/active_loader.h

Issue 18123002: Migrate webkit/renderer/media/ to content/renderer/media/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: delegates Created 7 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 2013 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 WEBKIT_RENDERER_MEDIA_ACTIVE_LOADER_H_
6 #define WEBKIT_RENDERER_MEDIA_ACTIVE_LOADER_H_
7
8 #include "base/basictypes.h"
9 #include "base/memory/scoped_ptr.h"
10
11 namespace WebKit {
12 class WebURLLoader;
13 }
14
15 namespace webkit_media {
16
17 // Wraps an active WebURLLoader with some additional state.
18 //
19 // Handles deferring and deletion of loaders.
20 class ActiveLoader {
21 public:
22 // Creates an ActiveLoader with the given loader. It is assumed that the
23 // initial state of |loader| is loading and not deferred.
24 explicit ActiveLoader(scoped_ptr<WebKit::WebURLLoader> loader);
25 ~ActiveLoader();
26
27 // Starts or stops deferring the resource load.
28 void SetDeferred(bool deferred);
29 bool deferred() { return deferred_; }
30
31 private:
32 friend class BufferedDataSourceTest;
33
34 scoped_ptr<WebKit::WebURLLoader> loader_;
35 bool deferred_;
36
37 DISALLOW_IMPLICIT_CONSTRUCTORS(ActiveLoader);
38 };
39
40 } // namespace webkit_media
41
42 #endif // WEBKIT_RENDERER_MEDIA_ACTIVE_LOADER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698