Chromium Code Reviews| Index: content/renderer/render_thread_impl.cc |
| diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc |
| index 31575157bc08ba1173709418b40c4d29471526b8..6b9ee30a54031497c7d4856cb99a3dd9a7c3063c 100644 |
| --- a/content/renderer/render_thread_impl.cc |
| +++ b/content/renderer/render_thread_impl.cc |
| @@ -174,16 +174,18 @@ const int kMaxRasterThreads = 64; |
| // Keep the global RenderThreadImpl in a TLS slot so it is impossible to access |
| // incorrectly from the wrong thread. |
| base::LazyInstance<base::ThreadLocalPointer<RenderThreadImpl> > |
| - lazy_tls = LAZY_INSTANCE_INITIALIZER; |
| +lazy_tls = LAZY_INSTANCE_INITIALIZER; |
| class RenderViewZoomer : public RenderViewVisitor { |
| public: |
| RenderViewZoomer(const std::string& scheme, |
| const std::string& host, |
| - double zoom_level) : scheme_(scheme), |
| - host_(host), |
| - zoom_level_(zoom_level) { |
| - } |
| + double zoom_level, |
| + const std::set<int>& exceptions) |
| + : scheme_(scheme), |
| + host_(host), |
| + zoom_level_(zoom_level), |
| + exceptions_(exceptions) {} |
| virtual bool Visit(RenderView* render_view) OVERRIDE { |
| WebView* webview = render_view->GetWebView(); |
| @@ -191,7 +193,8 @@ class RenderViewZoomer : public RenderViewVisitor { |
| // Don't set zoom level for full-page plugin since they don't use the same |
| // zoom settings. |
|
Fady Samuel
2014/04/07 21:27:24
Update this comment.
paulmeyer
2014/04/08 21:13:20
Done.
|
| - if (document.isPluginDocument()) |
| + if (document.isPluginDocument() || |
| + exceptions_.count(render_view->GetRoutingID())) |
| return true; |
| GURL url(document.url()); |
| // Empty scheme works as wildcard that matches any scheme, |
| @@ -206,6 +209,7 @@ class RenderViewZoomer : public RenderViewVisitor { |
| const std::string scheme_; |
| const std::string host_; |
| const double zoom_level_; |
| + const std::set<int> exceptions_; |
| DISALLOW_COPY_AND_ASSIGN(RenderViewZoomer); |
| }; |
| @@ -1212,10 +1216,12 @@ void RenderThreadImpl::DoNotNotifyWebKitOfModalLoop() { |
| notify_webkit_of_modal_loop_ = false; |
| } |
| -void RenderThreadImpl::OnSetZoomLevelForCurrentURL(const std::string& scheme, |
| - const std::string& host, |
| - double zoom_level) { |
| - RenderViewZoomer zoomer(scheme, host, zoom_level); |
| +void RenderThreadImpl::OnSetZoomLevelForCurrentURL( |
| + const std::string& scheme, |
| + const std::string& host, |
| + double zoom_level, |
| + const std::set<int>& exceptions) { |
| + RenderViewZoomer zoomer(scheme, host, zoom_level, exceptions); |
| RenderView::ForEach(&zoomer); |
| } |