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 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 WebDocument document = webview->mainFrame()->document(); | 189 WebDocument document = webview->mainFrame()->document(); |
190 | 190 |
191 // Don't set zoom level for full-page plugin since they don't use the same | 191 // Don't set zoom level for full-page plugin since they don't use the same |
192 // zoom settings. | 192 // zoom settings. |
193 if (document.isPluginDocument()) | 193 if (document.isPluginDocument()) |
194 return true; | 194 return true; |
195 GURL url(document.url()); | 195 GURL url(document.url()); |
196 // Empty scheme works as wildcard that matches any scheme, | 196 // Empty scheme works as wildcard that matches any scheme, |
197 if ((net::GetHostOrSpecFromURL(url) == host_) && | 197 if ((net::GetHostOrSpecFromURL(url) == host_) && |
198 (scheme_.empty() || scheme_ == url.scheme())) { | 198 (scheme_.empty() || scheme_ == url.scheme())) { |
| 199 webview->hidePopups(); |
199 webview->setZoomLevel(zoom_level_); | 200 webview->setZoomLevel(zoom_level_); |
200 } | 201 } |
201 return true; | 202 return true; |
202 } | 203 } |
203 | 204 |
204 private: | 205 private: |
205 const std::string scheme_; | 206 const std::string scheme_; |
206 const std::string host_; | 207 const std::string host_; |
207 const double zoom_level_; | 208 const double zoom_level_; |
208 | 209 |
(...skipping 1298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1507 hidden_widget_count_--; | 1508 hidden_widget_count_--; |
1508 | 1509 |
1509 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { | 1510 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { |
1510 return; | 1511 return; |
1511 } | 1512 } |
1512 | 1513 |
1513 ScheduleIdleHandler(kLongIdleHandlerDelayMs); | 1514 ScheduleIdleHandler(kLongIdleHandlerDelayMs); |
1514 } | 1515 } |
1515 | 1516 |
1516 } // namespace content | 1517 } // namespace content |
OLD | NEW |