| OLD | NEW |
| 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 Loading... |
| 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 1298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1508 hidden_widget_count_--; | 1509 hidden_widget_count_--; |
| 1509 | 1510 |
| 1510 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { | 1511 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { |
| 1511 return; | 1512 return; |
| 1512 } | 1513 } |
| 1513 | 1514 |
| 1514 ScheduleIdleHandler(kLongIdleHandlerDelayMs); | 1515 ScheduleIdleHandler(kLongIdleHandlerDelayMs); |
| 1515 } | 1516 } |
| 1516 | 1517 |
| 1517 } // namespace content | 1518 } // namespace content |
| OLD | NEW |