Chromium Code Reviews| Index: content/browser/host_zoom_map_impl.cc |
| =================================================================== |
| --- content/browser/host_zoom_map_impl.cc (revision 164795) |
| +++ content/browser/host_zoom_map_impl.cc (working copy) |
| @@ -23,9 +23,6 @@ |
| #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" |
| using WebKit::WebView; |
| -using content::BrowserThread; |
| -using content::RenderProcessHost; |
| -using content::RenderViewHost; |
| static const char* kHostZoomMapKeyName = "content_host_zoom_map"; |
| @@ -41,13 +38,11 @@ |
| return rv; |
| } |
| -} // namespace content |
| - |
| HostZoomMapImpl::HostZoomMapImpl() |
| : default_zoom_level_(0.0) { |
| registrar_.Add( |
| - this, content::NOTIFICATION_RENDER_VIEW_HOST_WILL_CLOSE_RENDER_VIEW, |
| - content::NotificationService::AllSources()); |
| + this, NOTIFICATION_RENDER_VIEW_HOST_WILL_CLOSE_RENDER_VIEW, |
|
tfarina
2012/10/30 22:19:06
this fits above now.
|
| + NotificationService::AllSources()); |
| } |
| void HostZoomMapImpl::CopyFrom(HostZoomMap* copy_interface) { |
| @@ -77,7 +72,7 @@ |
| { |
| base::AutoLock auto_lock(lock_); |
| - if (content::ZoomValuesEqual(level, default_zoom_level_)) |
| + if (ZoomValuesEqual(level, default_zoom_level_)) |
| host_zoom_levels_.erase(host); |
| else |
| host_zoom_levels_[host] = level; |
| @@ -94,10 +89,10 @@ |
| } |
| } |
| - content::NotificationService::current()->Notify( |
| - content::NOTIFICATION_ZOOM_LEVEL_CHANGED, |
| - content::Source<HostZoomMap>(this), |
| - content::Details<const std::string>(&host)); |
| + NotificationService::current()->Notify( |
| + NOTIFICATION_ZOOM_LEVEL_CHANGED, |
|
tfarina
2012/10/30 22:19:06
fits above;
|
| + Source<HostZoomMap>(this), |
| + Details<const std::string>(&host)); |
| } |
| double HostZoomMapImpl::GetDefaultZoomLevel() const { |
| @@ -150,23 +145,21 @@ |
| } |
| std::string host; |
| - content::NotificationService::current()->Notify( |
| - content::NOTIFICATION_ZOOM_LEVEL_CHANGED, |
| - content::Source<HostZoomMap>(this), |
| - content::Details<const std::string>(&host)); |
| + NotificationService::current()->Notify( |
| + NOTIFICATION_ZOOM_LEVEL_CHANGED, |
|
tfarina
2012/10/30 22:19:06
fits above.
|
| + Source<HostZoomMap>(this), |
| + Details<const std::string>(&host)); |
| } |
| -void HostZoomMapImpl::Observe( |
| - int type, |
| - const content::NotificationSource& source, |
| - const content::NotificationDetails& details) { |
| +void HostZoomMapImpl::Observe(int type, |
| + const NotificationSource& source, |
| + const NotificationDetails& details) { |
| switch (type) { |
| - case content::NOTIFICATION_RENDER_VIEW_HOST_WILL_CLOSE_RENDER_VIEW: { |
| + case NOTIFICATION_RENDER_VIEW_HOST_WILL_CLOSE_RENDER_VIEW: { |
| base::AutoLock auto_lock(lock_); |
| - int render_view_id = |
| - content::Source<RenderViewHost>(source)->GetRoutingID(); |
| + int render_view_id = Source<RenderViewHost>(source)->GetRoutingID(); |
| int render_process_id = |
| - content::Source<RenderViewHost>(source)->GetProcess()->GetID(); |
| + Source<RenderViewHost>(source)->GetProcess()->GetID(); |
| for (size_t i = 0; i < temporary_zoom_levels_.size(); ++i) { |
| if (temporary_zoom_levels_[i].render_process_id == render_process_id && |
| @@ -184,3 +177,5 @@ |
| HostZoomMapImpl::~HostZoomMapImpl() { |
| } |
| + |
| +} // namespace content |