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_view_impl.h" | 5 #include "content/renderer/render_view_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <cmath> | 8 #include <cmath> |
9 | 9 |
10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
(...skipping 1240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1251 | 1251 |
1252 // Get rendered text from WebLocalFrame. | 1252 // Get rendered text from WebLocalFrame. |
1253 // TODO: Currently IPC truncates any data that has a | 1253 // TODO: Currently IPC truncates any data that has a |
1254 // size > kMaximumMessageSize. May be split the text into smaller chunks and | 1254 // size > kMaximumMessageSize. May be split the text into smaller chunks and |
1255 // send back using multiple IPC. See http://crbug.com/393444. | 1255 // send back using multiple IPC. See http://crbug.com/393444. |
1256 static const size_t kMaximumMessageSize = 8 * 1024 * 1024; | 1256 static const size_t kMaximumMessageSize = 8 * 1024 * 1024; |
1257 // TODO(dglazkov): Using this API is wrong. It's not OOPIF-compatible and | 1257 // TODO(dglazkov): Using this API is wrong. It's not OOPIF-compatible and |
1258 // sends text in the wrong order. See http://crbug.com/584798. | 1258 // sends text in the wrong order. See http://crbug.com/584798. |
1259 // TODO(dglazkov): WebFrameContentDumper should only be used for | 1259 // TODO(dglazkov): WebFrameContentDumper should only be used for |
1260 // testing purposes. See http://crbug.com/585164. | 1260 // testing purposes. See http://crbug.com/585164. |
| 1261 webview()->updateAllLifecyclePhases(); |
1261 std::string text = | 1262 std::string text = |
1262 WebFrameContentDumper::dumpFrameTreeAsText( | 1263 WebFrameContentDumper::dumpFrameTreeAsText( |
1263 webview()->mainFrame()->toWebLocalFrame(), kMaximumMessageSize) | 1264 webview()->mainFrame()->toWebLocalFrame(), kMaximumMessageSize) |
1264 .utf8(); | 1265 .utf8(); |
1265 | 1266 |
1266 Send(new ViewMsg_GetRenderedTextCompleted(routing_id(), text)); | 1267 Send(new ViewMsg_GetRenderedTextCompleted(routing_id(), text)); |
1267 } | 1268 } |
1268 | 1269 |
1269 void RenderViewImpl::StartPluginIme() { | 1270 void RenderViewImpl::StartPluginIme() { |
1270 IPC::Message* msg = new ViewHostMsg_StartPluginIme(routing_id()); | 1271 IPC::Message* msg = new ViewHostMsg_StartPluginIme(routing_id()); |
(...skipping 2281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3552 if (IsUseZoomForDSFEnabled()) { | 3553 if (IsUseZoomForDSFEnabled()) { |
3553 webview()->setZoomFactorForDeviceScaleFactor(device_scale_factor_); | 3554 webview()->setZoomFactorForDeviceScaleFactor(device_scale_factor_); |
3554 } else { | 3555 } else { |
3555 webview()->setDeviceScaleFactor(device_scale_factor_); | 3556 webview()->setDeviceScaleFactor(device_scale_factor_); |
3556 } | 3557 } |
3557 webview()->settings()->setPreferCompositingToLCDTextEnabled( | 3558 webview()->settings()->setPreferCompositingToLCDTextEnabled( |
3558 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_)); | 3559 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_)); |
3559 } | 3560 } |
3560 | 3561 |
3561 } // namespace content | 3562 } // namespace content |
OLD | NEW |