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

Side by Side Diff: content/renderer/render_thread_impl.cc

Issue 287093002: Remove ViewMsg_SetZoomLevel (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Revised as per comments. Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/render_thread_impl.h" 5 #include "content/renderer/render_thread_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <map> 9 #include <map>
10 #include <vector> 10 #include <vector>
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 WebDocument document = webview->mainFrame()->document(); 190 WebDocument document = webview->mainFrame()->document();
191 191
192 // Don't set zoom level for full-page plugin since they don't use the same 192 // Don't set zoom level for full-page plugin since they don't use the same
193 // zoom settings. 193 // zoom settings.
194 if (document.isPluginDocument()) 194 if (document.isPluginDocument())
195 return true; 195 return true;
196 GURL url(document.url()); 196 GURL url(document.url());
197 // Empty scheme works as wildcard that matches any scheme, 197 // Empty scheme works as wildcard that matches any scheme,
198 if ((net::GetHostOrSpecFromURL(url) == host_) && 198 if ((net::GetHostOrSpecFromURL(url) == host_) &&
199 (scheme_.empty() || scheme_ == url.scheme())) { 199 (scheme_.empty() || scheme_ == url.scheme())) {
200 webview->hidePopups();
200 webview->setZoomLevel(zoom_level_); 201 webview->setZoomLevel(zoom_level_);
201 } 202 }
202 return true; 203 return true;
203 } 204 }
204 205
205 private: 206 private:
206 const std::string scheme_; 207 const std::string scheme_;
207 const std::string host_; 208 const std::string host_;
208 const double zoom_level_; 209 const double zoom_level_;
209 210
(...skipping 1303 matching lines...) Expand 10 before | Expand all | Expand 10 after
1513 hidden_widget_count_--; 1514 hidden_widget_count_--;
1514 1515
1515 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { 1516 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) {
1516 return; 1517 return;
1517 } 1518 }
1518 1519
1519 ScheduleIdleHandler(kLongIdleHandlerDelayMs); 1520 ScheduleIdleHandler(kLongIdleHandlerDelayMs);
1520 } 1521 }
1521 1522
1522 } // namespace content 1523 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698