| OLD | NEW |
| (Empty) | |
| 1 // Copyright (c) 2010 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_RENDERER_HOST_BLOB_DISPATCHER_HOST_H_ |
| 6 #define CHROME_BROWSER_RENDERER_HOST_BLOB_DISPATCHER_HOST_H_ |
| 7 |
| 8 #include "base/hash_tables.h" |
| 9 #include "base/ref_counted.h" |
| 10 |
| 11 class ChromeBlobStorageContext; |
| 12 class GURL; |
| 13 |
| 14 namespace IPC { |
| 15 class Message; |
| 16 } |
| 17 |
| 18 namespace webkit_blob { |
| 19 class BlobData; |
| 20 } |
| 21 |
| 22 class BlobDispatcherHost { |
| 23 public: |
| 24 explicit BlobDispatcherHost( |
| 25 ChromeBlobStorageContext* blob_storage_context); |
| 26 ~BlobDispatcherHost(); |
| 27 |
| 28 void Shutdown(); |
| 29 bool OnMessageReceived(const IPC::Message& message, bool* msg_is_ok); |
| 30 |
| 31 private: |
| 32 |
| 33 void OnRegisterBlobUrl(const GURL& url, |
| 34 const scoped_refptr<webkit_blob::BlobData>& blob_data); |
| 35 void OnRegisterBlobUrlFrom(const GURL& url, const GURL& src_url); |
| 36 void OnUnregisterBlobUrl(const GURL& url); |
| 37 |
| 38 scoped_refptr<ChromeBlobStorageContext> blob_storage_context_; |
| 39 |
| 40 // Keep track of blob URLs registered in this process. Need to unregister |
| 41 // all of them when the renderer process dies. |
| 42 base::hash_set<std::string> blob_urls_; |
| 43 |
| 44 DISALLOW_IMPLICIT_CONSTRUCTORS(BlobDispatcherHost); |
| 45 }; |
| 46 |
| 47 #endif // CHROME_BROWSER_RENDERER_HOST_BLOB_DISPATCHER_HOST_H_ |
| OLD | NEW |