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

Side by Side Diff: chrome/browser/extensions/blob_holder.h

Issue 266373006: Blobs: Mechanism for creating Blobs in browser process, then transferring to renderer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 2014 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 CHROME_BROWSER_EXTENSIONS_BLOB_HOLDER_H_
6 #define CHROME_BROWSER_EXTENSIONS_BLOB_HOLDER_H_
7
8 #include "base/memory/scoped_ptr.h"
9 #include "base/memory/scoped_vector.h"
10 #include "content/public/browser/web_contents_observer.h"
11 #include "content/public/browser/web_contents_user_data.h"
12
13 namespace content {
14 class BlobHandle;
15 }
16
17 namespace extensions {
18
19 // Used for holding onto Blobs created into the browser process until a
20 // renderer takes over ownership.
21 class BlobHolder : public content::WebContentsObserver,
22 public content::WebContentsUserData<BlobHolder> {
23 public:
24 virtual ~BlobHolder();
25
26 void HoldBlobReference(scoped_ptr<content::BlobHandle> blob);
27
28 private:
29 explicit BlobHolder(content::WebContents* web_contents);
30 friend class content::WebContentsUserData<BlobHolder>;
31
32 // content::WebContentsObserver overrides.
33 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
34
35 // Message handlers.
36 void OnBlobOwnershipTaken(const std::string& uuid);
37
38 ScopedVector<content::BlobHandle> held_blobs_;
39
40 DISALLOW_COPY_AND_ASSIGN(BlobHolder);
41 };
42
43 } // namespace extensions
44
45 #endif // CHROME_BROWSER_EXTENSIONS_BLOB_HOLDER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/blob_holder.cc » ('j') | content/browser/fileapi/chrome_blob_storage_context.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698