diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-30 17:24:05 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-30 17:24:05 +0000 |
commit | 5c9250876fbe81ea49a9919804db4f3da33ef4a0 (patch) | |
tree | 4e83e468aa79e1b8bb8c75e69d1cca033a16cf76 /content | |
parent | 385e93180e0c9498df0c3996ad4e9b709d087fe6 (diff) | |
download | chromium_src-5c9250876fbe81ea49a9919804db4f3da33ef4a0.zip chromium_src-5c9250876fbe81ea49a9919804db4f3da33ef4a0.tar.gz chromium_src-5c9250876fbe81ea49a9919804db4f3da33ef4a0.tar.bz2 |
Create Content API around HostZoomMap.
BUG=98716
Review URL: https://chromiumcodereview.appspot.com/9296041
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@119684 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r-- | content/browser/host_zoom_map_impl.cc (renamed from content/browser/host_zoom_map.cc) | 41 | ||||
-rw-r--r-- | content/browser/host_zoom_map_impl.h (renamed from content/browser/host_zoom_map.h) | 63 | ||||
-rw-r--r-- | content/browser/host_zoom_map_impl_unittest.cc (renamed from content/browser/host_zoom_map_unittest.cc) | 5 | ||||
-rw-r--r-- | content/browser/renderer_host/async_resource_handler.cc | 5 | ||||
-rw-r--r-- | content/browser/renderer_host/async_resource_handler.h | 2 | ||||
-rw-r--r-- | content/browser/renderer_host/render_view_host.cc | 5 | ||||
-rw-r--r-- | content/browser/resource_context.h | 3 | ||||
-rw-r--r-- | content/browser/tab_contents/tab_contents.cc | 5 | ||||
-rw-r--r-- | content/content_browser.gypi | 5 | ||||
-rw-r--r-- | content/content_tests.gypi | 2 | ||||
-rw-r--r-- | content/public/browser/browser_context.h | 2 | ||||
-rw-r--r-- | content/public/browser/host_zoom_map.h | 67 | ||||
-rw-r--r-- | content/shell/shell_browser_context.cc | 4 | ||||
-rw-r--r-- | content/shell/shell_browser_context.h | 1 | ||||
-rw-r--r-- | content/test/test_browser_context.cc | 1 | ||||
-rw-r--r-- | content/test/test_browser_context.h | 2 |
16 files changed, 134 insertions, 79 deletions
diff --git a/content/browser/host_zoom_map.cc b/content/browser/host_zoom_map_impl.cc index 770347e..5223c96 100644 --- a/content/browser/host_zoom_map.cc +++ b/content/browser/host_zoom_map_impl.cc @@ -4,7 +4,7 @@ #include <cmath> -#include "content/browser/host_zoom_map.h" +#include "content/browser/host_zoom_map_impl.h" #include "base/string_piece.h" #include "base/utf_string_conversions.h" @@ -25,19 +25,28 @@ using WebKit::WebView; using content::BrowserThread; using content::RenderProcessHost; -HostZoomMap::HostZoomMap() +namespace content { + +HostZoomMap* HostZoomMap::Create() { + return new HostZoomMapImpl(); +} + +} // namespace content + +HostZoomMapImpl::HostZoomMapImpl() : default_zoom_level_(0.0) { registrar_.Add( this, content::NOTIFICATION_RENDER_VIEW_HOST_WILL_CLOSE_RENDER_VIEW, content::NotificationService::AllSources()); } -void HostZoomMap::CopyFrom(HostZoomMap* copy) { +void HostZoomMapImpl::CopyFrom(HostZoomMap* copy_interface) { // This can only be called on the UI thread to avoid deadlocks, otherwise // UI: a.CopyFrom(b); // IO: b.CopyFrom(a); // can deadlock. DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); + HostZoomMapImpl* copy = static_cast<HostZoomMapImpl*>(copy_interface); base::AutoLock auto_lock(lock_); base::AutoLock copy_auto_lock(copy->lock_); for (HostZoomLevels::const_iterator i(copy->host_zoom_levels_.begin()); @@ -46,13 +55,13 @@ void HostZoomMap::CopyFrom(HostZoomMap* copy) { } } -double HostZoomMap::GetZoomLevel(const std::string& host) const { +double HostZoomMapImpl::GetZoomLevel(const std::string& host) const { base::AutoLock auto_lock(lock_); HostZoomLevels::const_iterator i(host_zoom_levels_.find(host)); return (i == host_zoom_levels_.end()) ? default_zoom_level_ : i->second; } -void HostZoomMap::SetZoomLevel(std::string host, double level) { +void HostZoomMapImpl::SetZoomLevel(std::string host, double level) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); { @@ -80,8 +89,16 @@ void HostZoomMap::SetZoomLevel(std::string host, double level) { content::Details<const std::string>(&host)); } -double HostZoomMap::GetTemporaryZoomLevel(int render_process_id, - int render_view_id) const { +double HostZoomMapImpl::GetDefaultZoomLevel() const { + return default_zoom_level_; +} + +void HostZoomMapImpl::SetDefaultZoomLevel(double level) { + default_zoom_level_ = level; +} + +double HostZoomMapImpl::GetTemporaryZoomLevel(int render_process_id, + int render_view_id) const { base::AutoLock auto_lock(lock_); for (size_t i = 0; i < temporary_zoom_levels_.size(); ++i) { if (temporary_zoom_levels_[i].render_process_id == render_process_id && @@ -92,9 +109,9 @@ double HostZoomMap::GetTemporaryZoomLevel(int render_process_id, return 0; } -void HostZoomMap::SetTemporaryZoomLevel(int render_process_id, - int render_view_id, - double level) { +void HostZoomMapImpl::SetTemporaryZoomLevel(int render_process_id, + int render_view_id, + double level) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); { @@ -128,7 +145,7 @@ void HostZoomMap::SetTemporaryZoomLevel(int render_process_id, content::Details<const std::string>(&host)); } -void HostZoomMap::Observe( +void HostZoomMapImpl::Observe( int type, const content::NotificationSource& source, const content::NotificationDetails& details) { @@ -156,5 +173,5 @@ void HostZoomMap::Observe( } } -HostZoomMap::~HostZoomMap() { +HostZoomMapImpl::~HostZoomMapImpl() { } diff --git a/content/browser/host_zoom_map.h b/content/browser/host_zoom_map_impl.h index 53dd770..6d5cdd1 100644 --- a/content/browser/host_zoom_map.h +++ b/content/browser/host_zoom_map_impl.h @@ -2,55 +2,35 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Maps hostnames to custom zoom levels. Written on the UI thread and read on -// any thread. One instance per browser context. - -#ifndef CONTENT_BROWSER_HOST_ZOOM_MAP_H_ -#define CONTENT_BROWSER_HOST_ZOOM_MAP_H_ +#ifndef CONTENT_BROWSER_HOST_ZOOM_MAP_IMPL_H_ +#define CONTENT_BROWSER_HOST_ZOOM_MAP_IMPL_H_ #pragma once #include <map> #include <string> #include <vector> -#include "base/basictypes.h" -#include "base/memory/ref_counted.h" +#include "base/compiler_specific.h" #include "base/message_loop_helpers.h" #include "base/synchronization/lock.h" -#include "content/common/content_export.h" -#include "content/public/browser/browser_thread.h" +#include "content/public/browser/host_zoom_map.h" #include "content/public/browser/notification_observer.h" #include "content/public/browser/notification_registrar.h" // HostZoomMap needs to be deleted on the UI thread because it listens // to notifications on there (and holds a NotificationRegistrar). -class CONTENT_EXPORT HostZoomMap - : public content::NotificationObserver, - public base::RefCountedThreadSafe< - HostZoomMap, content::BrowserThread::DeleteOnUIThread> { +class CONTENT_EXPORT HostZoomMapImpl + : public NON_EXPORTED_BASE(content::HostZoomMap), + public content::NotificationObserver { public: - HostZoomMap(); - - // Copy the zoom levels from the given map. Can only be called on the UI - // thread. - void CopyFrom(HostZoomMap* copy); - - // Returns the zoom level for the host or spec for a given url. The zoom - // level is determined by the host portion of the URL, or (in the absence of - // a host) the complete spec of the URL. In most cases, there is no custom - // zoom level, and this returns the user's default zoom level. Otherwise, - // returns the saved zoom level, which may be positive (to zoom in) or - // negative (to zoom out). - // - // This may be called on any thread. - double GetZoomLevel(const std::string& host) const; + HostZoomMapImpl(); - // Sets the zoom level for the host or spec for a given url to |level|. If - // the level matches the current default zoom level, the host is erased - // from the saved preferences; otherwise the new value is written out. - // - // This should only be called on the UI thread. - void SetZoomLevel(std::string host, double level); + // HostZoomMap implementation: + virtual void CopyFrom(HostZoomMap* copy) OVERRIDE; + virtual double GetZoomLevel(const std::string& host) const OVERRIDE; + virtual void SetZoomLevel(std::string host, double level) OVERRIDE; + virtual double GetDefaultZoomLevel() const OVERRIDE; + virtual void SetDefaultZoomLevel(double level) OVERRIDE; // Returns the temporary zoom level that's only valid for the lifetime of // the given tab (i.e. isn't saved and doesn't affect other tabs) if it @@ -73,19 +53,10 @@ class CONTENT_EXPORT HostZoomMap const content::NotificationSource& source, const content::NotificationDetails& details) OVERRIDE; - double default_zoom_level() const { return default_zoom_level_; } - void set_default_zoom_level(double level) { default_zoom_level_ = level; } - private: - friend class base::RefCountedThreadSafe< - HostZoomMap, content::BrowserThread::DeleteOnUIThread>; - friend struct content::BrowserThread::DeleteOnThread< - content::BrowserThread::UI>; - friend class base::DeleteHelper<HostZoomMap>; - typedef std::map<std::string, double> HostZoomLevels; - virtual ~HostZoomMap(); + virtual ~HostZoomMapImpl(); // Copy of the pref data, so that we can read it on the IO thread. HostZoomLevels host_zoom_levels_; @@ -107,7 +78,7 @@ class CONTENT_EXPORT HostZoomMap content::NotificationRegistrar registrar_; - DISALLOW_COPY_AND_ASSIGN(HostZoomMap); + DISALLOW_COPY_AND_ASSIGN(HostZoomMapImpl); }; -#endif // CONTENT_BROWSER_HOST_ZOOM_MAP_H_ +#endif // CONTENT_BROWSER_HOST_ZOOM_MAP_IMPL_H_ diff --git a/content/browser/host_zoom_map_unittest.cc b/content/browser/host_zoom_map_impl_unittest.cc index d151362..cb0aba4 100644 --- a/content/browser/host_zoom_map_unittest.cc +++ b/content/browser/host_zoom_map_impl_unittest.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "content/browser/host_zoom_map.h" +#include "content/browser/host_zoom_map_impl.h" #include "base/memory/ref_counted.h" #include "base/message_loop.h" @@ -21,7 +21,7 @@ class HostZoomMapTest : public testing::Test { }; TEST_F(HostZoomMapTest, GetSetZoomLevel) { - scoped_refptr<HostZoomMap> host_zoom_map = new HostZoomMap; + scoped_refptr<HostZoomMapImpl> host_zoom_map = new HostZoomMapImpl; double zoomed = 2.5; host_zoom_map->SetZoomLevel("zoomed.com", zoomed); @@ -29,4 +29,3 @@ TEST_F(HostZoomMapTest, GetSetZoomLevel) { EXPECT_DOUBLE_EQ(host_zoom_map->GetZoomLevel("normal.com"), 0); EXPECT_DOUBLE_EQ(host_zoom_map->GetZoomLevel("zoomed.com"), zoomed); } - diff --git a/content/browser/renderer_host/async_resource_handler.cc b/content/browser/renderer_host/async_resource_handler.cc index c7fe3ff..4b1bf18 100644 --- a/content/browser/renderer_host/async_resource_handler.cc +++ b/content/browser/renderer_host/async_resource_handler.cc @@ -12,7 +12,7 @@ #include "base/logging.h" #include "base/shared_memory.h" #include "content/browser/debugger/devtools_netlog_observer.h" -#include "content/browser/host_zoom_map.h" +#include "content/browser/host_zoom_map_impl.h" #include "content/browser/renderer_host/resource_dispatcher_host.h" #include "content/browser/renderer_host/resource_dispatcher_host_request_info.h" #include "content/browser/renderer_host/resource_message_filter.h" @@ -84,7 +84,6 @@ AsyncResourceHandler::AsyncResourceHandler( ResourceDispatcherHost* resource_dispatcher_host) : filter_(filter), routing_id_(routing_id), - host_zoom_map_(NULL), rdh_(resource_dispatcher_host), next_buffer_size_(kInitialReadBufSize), url_(url) { @@ -136,7 +135,7 @@ bool AsyncResourceHandler::OnResponseStarted( const content::ResourceContext& resource_context = filter_->resource_context(); - HostZoomMap* host_zoom_map = resource_context.host_zoom_map(); + content::HostZoomMap* host_zoom_map = resource_context.host_zoom_map(); ResourceDispatcherHostRequestInfo* info = rdh_->InfoForRequest(request); if (info->resource_type() == ResourceType::MAIN_FRAME && host_zoom_map) { diff --git a/content/browser/renderer_host/async_resource_handler.h b/content/browser/renderer_host/async_resource_handler.h index ee5fc81..5e43615 100644 --- a/content/browser/renderer_host/async_resource_handler.h +++ b/content/browser/renderer_host/async_resource_handler.h @@ -11,7 +11,6 @@ #include "content/browser/renderer_host/resource_handler.h" #include "googleurl/src/gurl.h" -class HostZoomMap; class ResourceDispatcherHost; class ResourceMessageFilter; class SharedIOBuffer; @@ -59,7 +58,6 @@ class AsyncResourceHandler : public ResourceHandler { scoped_refptr<SharedIOBuffer> read_buffer_; scoped_refptr<ResourceMessageFilter> filter_; int routing_id_; - HostZoomMap* host_zoom_map_; ResourceDispatcherHost* rdh_; // |next_buffer_size_| is the size of the buffer to be allocated on the next diff --git a/content/browser/renderer_host/render_view_host.cc b/content/browser/renderer_host/render_view_host.cc index 3b6ba75..d8b3fab 100644 --- a/content/browser/renderer_host/render_view_host.cc +++ b/content/browser/renderer_host/render_view_host.cc @@ -20,7 +20,7 @@ #include "content/browser/child_process_security_policy.h" #include "content/browser/cross_site_request_manager.h" #include "content/browser/gpu/gpu_surface_tracker.h" -#include "content/browser/host_zoom_map.h" +#include "content/browser/host_zoom_map_impl.h" #include "content/browser/in_process_webkit/session_storage_namespace.h" #include "content/browser/power_save_blocker.h" #include "content/browser/renderer_host/render_process_host_impl.h" @@ -1466,7 +1466,8 @@ void RenderViewHost::OnScriptEvalResponse(int id, const ListValue& result) { void RenderViewHost::OnDidZoomURL(double zoom_level, bool remember, const GURL& url) { - HostZoomMap* host_zoom_map = process()->GetBrowserContext()->GetHostZoomMap(); + HostZoomMapImpl* host_zoom_map = static_cast<HostZoomMapImpl*>( + process()->GetBrowserContext()->GetHostZoomMap()); if (remember) { host_zoom_map->SetZoomLevel(net::GetHostOrSpecFromURL(url), zoom_level); } else { diff --git a/content/browser/resource_context.h b/content/browser/resource_context.h index 22803e3..61785fa 100644 --- a/content/browser/resource_context.h +++ b/content/browser/resource_context.h @@ -15,7 +15,6 @@ class AudioManager; class ChromeAppCacheService; class ChromeBlobStorageContext; -class HostZoomMap; class MediaObserver; namespace fileapi { class FileSystemContext; @@ -36,6 +35,8 @@ class DatabaseTracker; namespace content { +class HostZoomMap; + // ResourceContext contains the relevant context information required for // resource loading. It lives on the IO thread, although it is constructed on // the UI thread. ResourceContext doesn't own anything it points to, it just diff --git a/content/browser/tab_contents/tab_contents.cc b/content/browser/tab_contents/tab_contents.cc index 6e2780a..de5ee52 100644 --- a/content/browser/tab_contents/tab_contents.cc +++ b/content/browser/tab_contents/tab_contents.cc @@ -17,7 +17,7 @@ #include "content/browser/debugger/devtools_manager_impl.h" #include "content/browser/download/download_stats.h" #include "content/browser/download/save_package.h" -#include "content/browser/host_zoom_map.h" +#include "content/browser/host_zoom_map_impl.h" #include "content/browser/in_process_webkit/session_storage_namespace.h" #include "content/browser/intents/web_intents_dispatcher_impl.h" #include "content/browser/load_from_memory_cache_details.h" @@ -1044,7 +1044,8 @@ bool TabContents::GetClosedByUserGesture() const { } double TabContents::GetZoomLevel() const { - HostZoomMap* zoom_map = GetBrowserContext()->GetHostZoomMap(); + HostZoomMapImpl* zoom_map = static_cast<HostZoomMapImpl*>( + GetBrowserContext()->GetHostZoomMap()); if (!zoom_map) return 0; diff --git a/content/content_browser.gypi b/content/content_browser.gypi index c2d9bcf..975b4fe 100644 --- a/content/content_browser.gypi +++ b/content/content_browser.gypi @@ -61,6 +61,7 @@ 'public/browser/favicon_status.h', 'public/browser/geolocation_permission_context.h', 'public/browser/global_request_id.h', + 'public/browser/host_zoom_map.h', 'public/browser/invalidate_type.h', 'public/browser/native_web_keyboard_event.h', 'public/browser/navigation_controller.h', @@ -318,8 +319,8 @@ 'browser/gpu/gpu_process_host_ui_shim.h', 'browser/gpu/gpu_surface_tracker.cc', 'browser/gpu/gpu_surface_tracker.h', - 'browser/host_zoom_map.cc', - 'browser/host_zoom_map.h', + 'browser/host_zoom_map_impl.cc', + 'browser/host_zoom_map_impl.h', 'browser/in_process_webkit/browser_webkitplatformsupport_impl.cc', 'browser/in_process_webkit/browser_webkitplatformsupport_impl.h', 'browser/in_process_webkit/dom_storage_area.cc', diff --git a/content/content_tests.gypi b/content/content_tests.gypi index e525382..1287348 100644 --- a/content/content_tests.gypi +++ b/content/content_tests.gypi @@ -218,7 +218,7 @@ 'browser/geolocation/win7_location_api_unittest_win.cc', 'browser/geolocation/win7_location_provider_unittest_win.cc', 'browser/gpu/gpu_blacklist_unittest.cc', - 'browser/host_zoom_map_unittest.cc', + 'browser/host_zoom_map_impl_unittest.cc', 'browser/in_process_webkit/dom_storage_unittest.cc', 'browser/in_process_webkit/indexed_db_quota_client_unittest.cc', 'browser/in_process_webkit/webkit_context_unittest.cc', diff --git a/content/public/browser/browser_context.h b/content/public/browser/browser_context.h index cc8cce5..e2ba765 100644 --- a/content/public/browser/browser_context.h +++ b/content/public/browser/browser_context.h @@ -28,7 +28,6 @@ class ChromeAppCacheService; class ChromeBlobStorageContext; class FilePath; class SpeechInputPreferences; -class HostZoomMap; class SSLHostState; class WebKitContext; @@ -36,6 +35,7 @@ namespace content { class DownloadManager; class GeolocationPermissionContext; +class HostZoomMap; class ResourceContext; // This class holds the context needed for a browsing session. diff --git a/content/public/browser/host_zoom_map.h b/content/public/browser/host_zoom_map.h new file mode 100644 index 0000000..0ebf28f --- /dev/null +++ b/content/public/browser/host_zoom_map.h @@ -0,0 +1,67 @@ +// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CONTENT_PUBLIC_BROWSER_HOST_ZOOM_MAP_H_ +#define CONTENT_PUBLIC_BROWSER_HOST_ZOOM_MAP_H_ +#pragma once + +#include <map> +#include <string> +#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 { + +// 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> { + public: + CONTENT_EXPORT static HostZoomMap* Create(); + + // Copy the zoom levels from the given map. Can only be called on the UI + // thread. + virtual void CopyFrom(HostZoomMap* copy) = 0; + + // Returns the zoom level for the host or spec for a given url. The zoom + // level is determined by the host portion of the URL, or (in the absence of + // a host) the complete spec of the URL. In most cases, there is no custom + // zoom level, and this returns the user's default zoom level. Otherwise, + // returns the saved zoom level, which may be positive (to zoom in) or + // negative (to zoom out). + // + // This may be called on any thread. + virtual double GetZoomLevel(const std::string& host) const = 0; + + // Sets the zoom level for the host or spec for a given url to |level|. If + // the level matches the current default zoom level, the host is erased + // from the saved preferences; otherwise the new value is written out. + // + // This should only be called on the UI thread. + virtual void SetZoomLevel(std::string host, double level) = 0; + + // Get/Set the default zoom level for pages that don't override it. + virtual double GetDefaultZoomLevel() const = 0; + virtual void SetDefaultZoomLevel(double level) = 0;; + + 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 + +#endif // CONTENT_PUBLIC_BROWSER_HOST_ZOOM_MAP_H_ diff --git a/content/shell/shell_browser_context.cc b/content/shell/shell_browser_context.cc index f6dff1e..7cca20e 100644 --- a/content/shell/shell_browser_context.cc +++ b/content/shell/shell_browser_context.cc @@ -15,7 +15,7 @@ #include "content/browser/download/download_manager_impl.h" #include "content/browser/download/download_status_updater.h" #include "content/browser/file_system/browser_file_system_helper.h" -#include "content/browser/host_zoom_map.h" +#include "content/browser/host_zoom_map_impl.h" #include "content/browser/in_process_webkit/webkit_context.h" #include "content/browser/speech/speech_input_preferences.h" #include "content/browser/ssl/ssl_host_state.h" @@ -181,7 +181,7 @@ const ResourceContext& ShellBrowserContext::GetResourceContext() { HostZoomMap* ShellBrowserContext::GetHostZoomMap() { if (!host_zoom_map_) - host_zoom_map_ = new HostZoomMap(); + host_zoom_map_ = HostZoomMap::Create(); return host_zoom_map_.get(); } diff --git a/content/shell/shell_browser_context.h b/content/shell/shell_browser_context.h index b1b8a7b..6828165 100644 --- a/content/shell/shell_browser_context.h +++ b/content/shell/shell_browser_context.h @@ -14,7 +14,6 @@ class DownloadManager; class DownloadStatusUpdater; -class HostZoomMap; class SSLHostState; namespace content { diff --git a/content/test/test_browser_context.cc b/content/test/test_browser_context.cc index 4461eb8..e5dac19 100644 --- a/content/test/test_browser_context.cc +++ b/content/test/test_browser_context.cc @@ -10,6 +10,7 @@ #include "testing/gtest/include/gtest/gtest.h" using content::DownloadManager; +using content::HostZoomMap; TestBrowserContext::TestBrowserContext() { EXPECT_TRUE(browser_context_dir_.CreateUniqueTempDir()); diff --git a/content/test/test_browser_context.h b/content/test/test_browser_context.h index 3824d49..3229a29 100644 --- a/content/test/test_browser_context.h +++ b/content/test/test_browser_context.h @@ -29,7 +29,7 @@ class TestBrowserContext : public content::BrowserContext { int renderer_child_id) OVERRIDE; virtual net::URLRequestContextGetter* GetRequestContextForMedia() OVERRIDE; virtual const content::ResourceContext& GetResourceContext() OVERRIDE; - virtual HostZoomMap* GetHostZoomMap() OVERRIDE; + virtual content::HostZoomMap* GetHostZoomMap() OVERRIDE; virtual content::GeolocationPermissionContext* GetGeolocationPermissionContext() OVERRIDE; virtual SpeechInputPreferences* GetSpeechInputPreferences() OVERRIDE; |