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

Unified Diff: content/public/browser/host_zoom_map.h

Issue 9416070: Move creation and ownership of HostZoomMap to content instead of having every embedder do this. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix mac/cros browsertests Created 8 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/public/browser/browser_context.h ('k') | content/public/browser/resource_context.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/browser/host_zoom_map.h
===================================================================
--- content/public/browser/host_zoom_map.h (revision 122827)
+++ content/public/browser/host_zoom_map.h (working copy)
@@ -11,20 +11,20 @@
#include <vector>
#include "base/basictypes.h"
-#include "base/memory/ref_counted.h"
#include "content/common/content_export.h"
-#include "content/public/browser/browser_thread.h"
namespace content {
+class BrowserContext;
+class ResourceContext;
+
// Maps hostnames to custom zoom levels. Written on the UI thread and read on
// any thread. One instance per browser context. Must be created on the UI
// thread, and it'll delete itself on the UI thread as well.
-class HostZoomMap
- : public base::RefCountedThreadSafe<
- HostZoomMap, content::BrowserThread::DeleteOnUIThread> {
+class HostZoomMap {
public:
- CONTENT_EXPORT static HostZoomMap* Create();
+ CONTENT_EXPORT static HostZoomMap* GetForBrowserContext(
+ BrowserContext* browser_context);
// Copy the zoom levels from the given map. Can only be called on the UI
// thread.
@@ -53,13 +53,6 @@
protected:
virtual ~HostZoomMap() {}
-
- private:
- friend class base::RefCountedThreadSafe<
- HostZoomMap, content::BrowserThread::DeleteOnUIThread>;
- friend struct content::BrowserThread::DeleteOnThread<
- content::BrowserThread::UI>;
- friend class base::DeleteHelper<HostZoomMap>;
};
} // namespace content
« no previous file with comments | « content/public/browser/browser_context.h ('k') | content/public/browser/resource_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698