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 2287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2298 | 2298 |
2299 blink::WebPageVisibilityState RenderViewImpl::GetVisibilityState() const { | 2299 blink::WebPageVisibilityState RenderViewImpl::GetVisibilityState() const { |
2300 return visibilityState(); | 2300 return visibilityState(); |
2301 } | 2301 } |
2302 | 2302 |
2303 void RenderViewImpl::DidStartLoading() { | 2303 void RenderViewImpl::DidStartLoading() { |
2304 main_render_frame_->didStartLoading(true); | 2304 main_render_frame_->didStartLoading(true); |
2305 } | 2305 } |
2306 | 2306 |
2307 void RenderViewImpl::DidStopLoading() { | 2307 void RenderViewImpl::DidStopLoading() { |
2308 main_render_frame_->didStopLoading(); | 2308 main_render_frame_->didStopLoading(main_render_frame_->GetWebFrame()); |
2309 } | 2309 } |
2310 | 2310 |
2311 blink::WebElement RenderViewImpl::GetFocusedElement() const { | 2311 blink::WebElement RenderViewImpl::GetFocusedElement() const { |
2312 if (!webview()) | 2312 if (!webview()) |
2313 return WebElement(); | 2313 return WebElement(); |
2314 WebFrame* focused_frame = webview()->focusedFrame(); | 2314 WebFrame* focused_frame = webview()->focusedFrame(); |
2315 if (focused_frame) { | 2315 if (focused_frame) { |
2316 WebDocument doc = focused_frame->document(); | 2316 WebDocument doc = focused_frame->document(); |
2317 if (!doc.isNull()) | 2317 if (!doc.isNull()) |
2318 return doc.focusedElement(); | 2318 return doc.focusedElement(); |
(...skipping 1218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3537 if (IsUseZoomForDSFEnabled()) { | 3537 if (IsUseZoomForDSFEnabled()) { |
3538 webview()->setZoomFactorForDeviceScaleFactor(device_scale_factor_); | 3538 webview()->setZoomFactorForDeviceScaleFactor(device_scale_factor_); |
3539 } else { | 3539 } else { |
3540 webview()->setDeviceScaleFactor(device_scale_factor_); | 3540 webview()->setDeviceScaleFactor(device_scale_factor_); |
3541 } | 3541 } |
3542 webview()->settings()->setPreferCompositingToLCDTextEnabled( | 3542 webview()->settings()->setPreferCompositingToLCDTextEnabled( |
3543 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_)); | 3543 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_)); |
3544 } | 3544 } |
3545 | 3545 |
3546 } // namespace content | 3546 } // namespace content |
OLD | NEW |