| Index: content/renderer/render_thread_impl.cc
|
| diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
|
| index 3f13b2000edfb77f1988242e714018cd76b1de46..7d37f68d03fb5a7961f95ca12aff1fac9e746a1d 100644
|
| --- a/content/renderer/render_thread_impl.cc
|
| +++ b/content/renderer/render_thread_impl.cc
|
| @@ -181,9 +181,17 @@ 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) {}
|
| +
|
| + bool IsExcepted(RenderView* render_view) {
|
| + std::set<int>::const_iterator it =
|
| + exceptions_.find(render_view->GetRoutingID());
|
| + return it != exceptions_.end();
|
| }
|
|
|
| virtual bool Visit(RenderView* render_view) OVERRIDE {
|
| @@ -197,7 +205,8 @@ class RenderViewZoomer : public RenderViewVisitor {
|
| GURL url(document.url());
|
| // Empty scheme works as wildcard that matches any scheme,
|
| if ((net::GetHostOrSpecFromURL(url) == host_) &&
|
| - (scheme_.empty() || scheme_ == url.scheme())) {
|
| + (scheme_.empty() || scheme_ == url.scheme()) &&
|
| + !IsExcepted(render_view)) {
|
| webview->hidePopups();
|
| webview->setZoomLevel(zoom_level_);
|
| }
|
| @@ -208,6 +217,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);
|
| };
|
| @@ -1194,10 +1204,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);
|
| }
|
|
|
|
|