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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 // incorrectly from the wrong thread. | 139 // incorrectly from the wrong thread. |
140 base::LazyInstance<base::ThreadLocalPointer<RenderThreadImpl> > | 140 base::LazyInstance<base::ThreadLocalPointer<RenderThreadImpl> > |
141 lazy_tls = LAZY_INSTANCE_INITIALIZER; | 141 lazy_tls = LAZY_INSTANCE_INITIALIZER; |
142 | 142 |
143 class RenderViewZoomer : public RenderViewVisitor { | 143 class RenderViewZoomer : public RenderViewVisitor { |
144 public: | 144 public: |
145 RenderViewZoomer(const std::string& host, double zoom_level) | 145 RenderViewZoomer(const std::string& host, double zoom_level) |
146 : host_(host), zoom_level_(zoom_level) { | 146 : host_(host), zoom_level_(zoom_level) { |
147 } | 147 } |
148 | 148 |
149 virtual bool Visit(RenderView* render_view) { | 149 virtual bool Visit(RenderView* render_view) OVERRIDE { |
150 WebView* webview = render_view->GetWebView(); | 150 WebView* webview = render_view->GetWebView(); |
151 WebDocument document = webview->mainFrame()->document(); | 151 WebDocument document = webview->mainFrame()->document(); |
152 | 152 |
153 // Don't set zoom level for full-page plugin since they don't use the same | 153 // Don't set zoom level for full-page plugin since they don't use the same |
154 // zoom settings. | 154 // zoom settings. |
155 if (document.isPluginDocument()) | 155 if (document.isPluginDocument()) |
156 return true; | 156 return true; |
157 | 157 |
158 if (net::GetHostOrSpecFromURL(GURL(document.url())) == host_) | 158 if (net::GetHostOrSpecFromURL(GURL(document.url())) == host_) |
159 webview->setZoomLevel(false, zoom_level_); | 159 webview->setZoomLevel(false, zoom_level_); |
(...skipping 1033 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1193 | 1193 |
1194 void RenderThreadImpl::SetFlingCurveParameters( | 1194 void RenderThreadImpl::SetFlingCurveParameters( |
1195 const std::vector<float>& new_touchpad, | 1195 const std::vector<float>& new_touchpad, |
1196 const std::vector<float>& new_touchscreen) { | 1196 const std::vector<float>& new_touchscreen) { |
1197 webkit_platform_support_->SetFlingCurveParameters(new_touchpad, | 1197 webkit_platform_support_->SetFlingCurveParameters(new_touchpad, |
1198 new_touchscreen); | 1198 new_touchscreen); |
1199 | 1199 |
1200 } | 1200 } |
1201 | 1201 |
1202 } // namespace content | 1202 } // namespace content |
OLD | NEW |