Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(597)

Side by Side Diff: content/renderer/render_view_impl.cc

Issue 2416153005: Remove usage of FOR_EACH_OBSERVER macro in content/renderer (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/renderer/render_thread_impl.cc ('k') | content/renderer/render_widget.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include <memory> 9 #include <memory>
10 10
(...skipping 863 matching lines...) Expand 10 before | Expand all | Expand 10 after
874 // Make sure we are no longer referenced by the ViewMap or RoutingIDViewMap. 874 // Make sure we are no longer referenced by the ViewMap or RoutingIDViewMap.
875 ViewMap* views = g_view_map.Pointer(); 875 ViewMap* views = g_view_map.Pointer();
876 for (ViewMap::iterator it = views->begin(); it != views->end(); ++it) 876 for (ViewMap::iterator it = views->begin(); it != views->end(); ++it)
877 DCHECK_NE(this, it->second) << "Failed to call Close?"; 877 DCHECK_NE(this, it->second) << "Failed to call Close?";
878 RoutingIDViewMap* routing_id_views = g_routing_id_view_map.Pointer(); 878 RoutingIDViewMap* routing_id_views = g_routing_id_view_map.Pointer();
879 for (RoutingIDViewMap::iterator it = routing_id_views->begin(); 879 for (RoutingIDViewMap::iterator it = routing_id_views->begin();
880 it != routing_id_views->end(); ++it) 880 it != routing_id_views->end(); ++it)
881 DCHECK_NE(this, it->second) << "Failed to call Close?"; 881 DCHECK_NE(this, it->second) << "Failed to call Close?";
882 #endif 882 #endif
883 883
884 FOR_EACH_OBSERVER(RenderViewObserver, observers_, RenderViewGone()); 884 for (auto& observer : observers_)
885 FOR_EACH_OBSERVER(RenderViewObserver, observers_, OnDestruct()); 885 observer.RenderViewGone();
886 for (auto& observer : observers_)
887 observer.OnDestruct();
886 } 888 }
887 889
888 /*static*/ 890 /*static*/
889 RenderViewImpl* RenderViewImpl::FromWebView(WebView* webview) { 891 RenderViewImpl* RenderViewImpl::FromWebView(WebView* webview) {
890 ViewMap* views = g_view_map.Pointer(); 892 ViewMap* views = g_view_map.Pointer();
891 ViewMap::iterator it = views->find(webview); 893 ViewMap::iterator it = views->find(webview);
892 return it == views->end() ? NULL : it->second; 894 return it == views->end() ? NULL : it->second;
893 } 895 }
894 896
895 /*static*/ 897 /*static*/
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
1249 1251
1250 void RenderViewImpl::TransferActiveWheelFlingAnimation( 1252 void RenderViewImpl::TransferActiveWheelFlingAnimation(
1251 const blink::WebActiveWheelFlingParameters& params) { 1253 const blink::WebActiveWheelFlingParameters& params) {
1252 if (webview()) 1254 if (webview())
1253 webview()->transferActiveWheelFlingAnimation(params); 1255 webview()->transferActiveWheelFlingAnimation(params);
1254 } 1256 }
1255 1257
1256 // RenderWidgetInputHandlerDelegate ----------------------------------------- 1258 // RenderWidgetInputHandlerDelegate -----------------------------------------
1257 1259
1258 void RenderViewImpl::RenderWidgetFocusChangeComplete() { 1260 void RenderViewImpl::RenderWidgetFocusChangeComplete() {
1259 FOR_EACH_OBSERVER(RenderViewObserver, observers_, FocusChangeComplete()); 1261 for (auto& observer : observers_)
1262 observer.FocusChangeComplete();
1260 } 1263 }
1261 1264
1262 bool RenderViewImpl::DoesRenderWidgetHaveTouchEventHandlersAt( 1265 bool RenderViewImpl::DoesRenderWidgetHaveTouchEventHandlersAt(
1263 const gfx::Point& point) const { 1266 const gfx::Point& point) const {
1264 if (!webview()) 1267 if (!webview())
1265 return false; 1268 return false;
1266 return webview()->hasTouchEventHandlersAt(point); 1269 return webview()->hasTouchEventHandlersAt(point);
1267 } 1270 }
1268 1271
1269 bool RenderViewImpl::RenderWidgetWillHandleGestureEvent( 1272 bool RenderViewImpl::RenderWidgetWillHandleGestureEvent(
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
1621 UMA_HISTOGRAM_BOOLEAN("PrintPreview.InitiatedByScript", 1624 UMA_HISTOGRAM_BOOLEAN("PrintPreview.InitiatedByScript",
1622 frame->top() == frame); 1625 frame->top() == frame);
1623 1626
1624 // Logging whether the top frame is remote is sufficient in this case. If 1627 // Logging whether the top frame is remote is sufficient in this case. If
1625 // the top frame is local, the printing code will function correctly and 1628 // the top frame is local, the printing code will function correctly and
1626 // the frame itself will be printed, so the cases this histogram tracks is 1629 // the frame itself will be printed, so the cases this histogram tracks is
1627 // where printing of a subframe will fail as of now. 1630 // where printing of a subframe will fail as of now.
1628 UMA_HISTOGRAM_BOOLEAN("PrintPreview.OutOfProcessSubframe", 1631 UMA_HISTOGRAM_BOOLEAN("PrintPreview.OutOfProcessSubframe",
1629 frame->top()->isWebRemoteFrame()); 1632 frame->top()->isWebRemoteFrame());
1630 1633
1631 FOR_EACH_OBSERVER(RenderViewObserver, observers_, 1634 for (auto& observer : observers_)
1632 PrintPage(frame, input_handler().handling_input_event())); 1635 observer.PrintPage(frame, input_handler().handling_input_event());
1633 } 1636 }
1634 1637
1635 bool RenderViewImpl::enumerateChosenDirectory( 1638 bool RenderViewImpl::enumerateChosenDirectory(
1636 const WebString& path, 1639 const WebString& path,
1637 WebFileChooserCompletion* chooser_completion) { 1640 WebFileChooserCompletion* chooser_completion) {
1638 int id = enumeration_completion_id_++; 1641 int id = enumeration_completion_id_++;
1639 enumeration_completions_[id] = chooser_completion; 1642 enumeration_completions_[id] = chooser_completion;
1640 return Send(new ViewHostMsg_EnumerateDirectory( 1643 return Send(new ViewHostMsg_EnumerateDirectory(
1641 GetRoutingID(), id, blink::WebStringToFilePath(path))); 1644 GetRoutingID(), id, blink::WebStringToFilePath(path)));
1642 } 1645 }
1643 1646
1644 void RenderViewImpl::FrameDidStartLoading(WebFrame* frame) { 1647 void RenderViewImpl::FrameDidStartLoading(WebFrame* frame) {
1645 DCHECK_GE(frames_in_progress_, 0); 1648 DCHECK_GE(frames_in_progress_, 0);
1646 if (frames_in_progress_ == 0) 1649 if (frames_in_progress_ == 0) {
1647 FOR_EACH_OBSERVER(RenderViewObserver, observers_, DidStartLoading()); 1650 for (auto& observer : observers_)
1651 observer.DidStartLoading();
1652 }
1648 frames_in_progress_++; 1653 frames_in_progress_++;
1649 } 1654 }
1650 1655
1651 void RenderViewImpl::FrameDidStopLoading(WebFrame* frame) { 1656 void RenderViewImpl::FrameDidStopLoading(WebFrame* frame) {
1652 // TODO(japhet): This should be a DCHECK, but the pdf plugin sometimes 1657 // TODO(japhet): This should be a DCHECK, but the pdf plugin sometimes
1653 // calls DidStopLoading() without a matching DidStartLoading(). 1658 // calls DidStopLoading() without a matching DidStartLoading().
1654 if (frames_in_progress_ == 0) 1659 if (frames_in_progress_ == 0)
1655 return; 1660 return;
1656 frames_in_progress_--; 1661 frames_in_progress_--;
1657 if (frames_in_progress_ == 0) { 1662 if (frames_in_progress_ == 0) {
1658 DidStopLoadingIcons(); 1663 DidStopLoadingIcons();
1659 FOR_EACH_OBSERVER(RenderViewObserver, observers_, DidStopLoading()); 1664 for (auto& observer : observers_)
1665 observer.DidStopLoading();
1660 } 1666 }
1661 } 1667 }
1662 1668
1663 void RenderViewImpl::AttachWebFrameWidget(blink::WebFrameWidget* frame_widget) { 1669 void RenderViewImpl::AttachWebFrameWidget(blink::WebFrameWidget* frame_widget) {
1664 // The previous WebFrameWidget must already be detached by CloseForFrame(). 1670 // The previous WebFrameWidget must already be detached by CloseForFrame().
1665 DCHECK(!frame_widget_); 1671 DCHECK(!frame_widget_);
1666 frame_widget_ = frame_widget; 1672 frame_widget_ = frame_widget;
1667 } 1673 }
1668 1674
1669 void RenderViewImpl::SetZoomLevel(double zoom_level) { 1675 void RenderViewImpl::SetZoomLevel(double zoom_level) {
1670 // If we change the zoom level for the view, make sure any subsequent subframe 1676 // If we change the zoom level for the view, make sure any subsequent subframe
1671 // loads reflect the current zoom level. 1677 // loads reflect the current zoom level.
1672 page_zoom_level_ = zoom_level; 1678 page_zoom_level_ = zoom_level;
1673 1679
1674 webview()->setZoomLevel(zoom_level); 1680 webview()->setZoomLevel(zoom_level);
1675 FOR_EACH_OBSERVER(RenderViewObserver, observers_, OnZoomLevelChanged()); 1681 for (auto& observer : observers_)
1682 observer.OnZoomLevelChanged();
1676 } 1683 }
1677 1684
1678 void RenderViewImpl::didCancelCompositionOnSelectionChange() { 1685 void RenderViewImpl::didCancelCompositionOnSelectionChange() {
1679 Send(new InputHostMsg_ImeCancelComposition(GetRoutingID())); 1686 Send(new InputHostMsg_ImeCancelComposition(GetRoutingID()));
1680 } 1687 }
1681 1688
1682 void RenderViewImpl::SetValidationMessageDirection( 1689 void RenderViewImpl::SetValidationMessageDirection(
1683 base::string16* wrapped_main_text, 1690 base::string16* wrapped_main_text,
1684 blink::WebTextDirection main_text_hint, 1691 blink::WebTextDirection main_text_hint,
1685 base::string16* wrapped_sub_text, 1692 base::string16* wrapped_sub_text,
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
1845 WebElement element = const_cast<WebNode&>(toNode).to<WebElement>(); 1852 WebElement element = const_cast<WebNode&>(toNode).to<WebElement>();
1846 blink::WebRect rect = element.boundsInViewport(); 1853 blink::WebRect rect = element.boundsInViewport();
1847 ConvertViewportToWindowViaWidget(&rect); 1854 ConvertViewportToWindowViaWidget(&rect);
1848 node_bounds = gfx::Rect(rect); 1855 node_bounds = gfx::Rect(rect);
1849 is_editable = element.isEditable(); 1856 is_editable = element.isEditable();
1850 } 1857 }
1851 Send(new ViewHostMsg_FocusedNodeChanged(GetRoutingID(), is_editable, 1858 Send(new ViewHostMsg_FocusedNodeChanged(GetRoutingID(), is_editable,
1852 node_bounds)); 1859 node_bounds));
1853 1860
1854 // TODO(estade): remove. 1861 // TODO(estade): remove.
1855 FOR_EACH_OBSERVER(RenderViewObserver, observers_, FocusedNodeChanged(toNode)); 1862 for (auto& observer : observers_)
1863 observer.FocusedNodeChanged(toNode);
1856 1864
1857 RenderFrameImpl* previous_frame = nullptr; 1865 RenderFrameImpl* previous_frame = nullptr;
1858 if (!fromNode.isNull()) 1866 if (!fromNode.isNull())
1859 previous_frame = RenderFrameImpl::FromWebFrame(fromNode.document().frame()); 1867 previous_frame = RenderFrameImpl::FromWebFrame(fromNode.document().frame());
1860 RenderFrameImpl* new_frame = nullptr; 1868 RenderFrameImpl* new_frame = nullptr;
1861 if (!toNode.isNull()) 1869 if (!toNode.isNull())
1862 new_frame = RenderFrameImpl::FromWebFrame(toNode.document().frame()); 1870 new_frame = RenderFrameImpl::FromWebFrame(toNode.document().frame());
1863 1871
1864 if (previous_frame && previous_frame != new_frame) 1872 if (previous_frame && previous_frame != new_frame)
1865 previous_frame->FocusedNodeChanged(WebNode()); 1873 previous_frame->FocusedNodeChanged(WebNode());
1866 if (new_frame) 1874 if (new_frame)
1867 new_frame->FocusedNodeChanged(toNode); 1875 new_frame->FocusedNodeChanged(toNode);
1868 1876
1869 // TODO(dmazzoni): remove once there's a separate a11y tree per frame. 1877 // TODO(dmazzoni): remove once there's a separate a11y tree per frame.
1870 if (main_render_frame_) 1878 if (main_render_frame_)
1871 main_render_frame_->FocusedNodeChangedForAccessibility(toNode); 1879 main_render_frame_->FocusedNodeChangedForAccessibility(toNode);
1872 } 1880 }
1873 1881
1874 void RenderViewImpl::didUpdateLayout() { 1882 void RenderViewImpl::didUpdateLayout() {
1875 FOR_EACH_OBSERVER(RenderViewObserver, observers_, DidUpdateLayout()); 1883 for (auto& observer : observers_)
1884 observer.DidUpdateLayout();
1876 1885
1877 // We don't always want to set up a timer, only if we've been put in that 1886 // We don't always want to set up a timer, only if we've been put in that
1878 // mode by getting a |ViewMsg_EnablePreferredSizeChangedMode| 1887 // mode by getting a |ViewMsg_EnablePreferredSizeChangedMode|
1879 // message. 1888 // message.
1880 if (!send_preferred_size_changes_ || !webview()) 1889 if (!send_preferred_size_changes_ || !webview())
1881 return; 1890 return;
1882 1891
1883 if (check_preferred_size_timer_.IsRunning()) 1892 if (check_preferred_size_timer_.IsRunning())
1884 return; 1893 return;
1885 check_preferred_size_timer_.Start(FROM_HERE, 1894 check_preferred_size_timer_.Start(FROM_HERE,
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
1933 // NOTE: initial_rect_ may still have its default values at this point, but 1942 // NOTE: initial_rect_ may still have its default values at this point, but
1934 // that's okay. It'll be ignored if disposition is not NEW_POPUP, or the 1943 // that's okay. It'll be ignored if disposition is not NEW_POPUP, or the
1935 // browser process will impose a default position otherwise. 1944 // browser process will impose a default position otherwise.
1936 Send(new ViewHostMsg_ShowView(opener_id_, GetRoutingID(), 1945 Send(new ViewHostMsg_ShowView(opener_id_, GetRoutingID(),
1937 NavigationPolicyToDisposition(policy), 1946 NavigationPolicyToDisposition(policy),
1938 initial_rect_, opened_by_user_gesture_)); 1947 initial_rect_, opened_by_user_gesture_));
1939 SetPendingWindowRect(initial_rect_); 1948 SetPendingWindowRect(initial_rect_);
1940 } 1949 }
1941 1950
1942 void RenderViewImpl::onMouseDown(const WebNode& mouse_down_node) { 1951 void RenderViewImpl::onMouseDown(const WebNode& mouse_down_node) {
1943 FOR_EACH_OBSERVER( 1952 for (auto& observer : observers_)
1944 RenderViewObserver, observers_, OnMouseDown(mouse_down_node)); 1953 observer.OnMouseDown(mouse_down_node);
1945 } 1954 }
1946 1955
1947 void RenderViewImpl::didHandleGestureEvent( 1956 void RenderViewImpl::didHandleGestureEvent(
1948 const WebGestureEvent& event, 1957 const WebGestureEvent& event,
1949 bool event_cancelled) { 1958 bool event_cancelled) {
1950 RenderWidget::didHandleGestureEvent(event, event_cancelled); 1959 RenderWidget::didHandleGestureEvent(event, event_cancelled);
1951 1960
1952 if (!event_cancelled) { 1961 if (!event_cancelled) {
1953 FOR_EACH_OBSERVER( 1962 for (auto& observer : observers_)
1954 RenderViewObserver, observers_, DidHandleGestureEvent(event)); 1963 observer.DidHandleGestureEvent(event);
1955 } 1964 }
1956 1965
1957 // TODO(ananta): Piggyback off existing IPCs to communicate this information, 1966 // TODO(ananta): Piggyback off existing IPCs to communicate this information,
1958 // crbug/420130. 1967 // crbug/420130.
1959 #if defined(OS_WIN) 1968 #if defined(OS_WIN)
1960 if (event.type != blink::WebGestureEvent::GestureTap) 1969 if (event.type != blink::WebGestureEvent::GestureTap)
1961 return; 1970 return;
1962 1971
1963 // TODO(estade): hit test the event against focused node to make sure 1972 // TODO(estade): hit test the event against focused node to make sure
1964 // the tap actually hit the focused node. 1973 // the tap actually hit the focused node.
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after
2452 webview()->mainFrame()->toWebLocalFrame()->sendOrientationChangeEvent(); 2461 webview()->mainFrame()->toWebLocalFrame()->sendOrientationChangeEvent();
2453 } 2462 }
2454 2463
2455 void RenderViewImpl::OnPluginActionAt(const gfx::Point& location, 2464 void RenderViewImpl::OnPluginActionAt(const gfx::Point& location,
2456 const WebPluginAction& action) { 2465 const WebPluginAction& action) {
2457 if (webview()) 2466 if (webview())
2458 webview()->performPluginAction(action, location); 2467 webview()->performPluginAction(action, location);
2459 } 2468 }
2460 2469
2461 void RenderViewImpl::OnClosePage() { 2470 void RenderViewImpl::OnClosePage() {
2462 FOR_EACH_OBSERVER(RenderViewObserver, observers_, ClosePage()); 2471 for (auto& observer : observers_)
2472 observer.ClosePage();
2463 // TODO(creis): We'd rather use webview()->Close() here, but that currently 2473 // TODO(creis): We'd rather use webview()->Close() here, but that currently
2464 // sets the WebView's delegate_ to NULL, preventing any JavaScript dialogs 2474 // sets the WebView's delegate_ to NULL, preventing any JavaScript dialogs
2465 // in the onunload handler from appearing. For now, we're bypassing that and 2475 // in the onunload handler from appearing. For now, we're bypassing that and
2466 // calling the FrameLoader's CloseURL method directly. This should be 2476 // calling the FrameLoader's CloseURL method directly. This should be
2467 // revisited to avoid having two ways to close a page. Having a single way 2477 // revisited to avoid having two ways to close a page. Having a single way
2468 // to close that can run onunload is also useful for fixing 2478 // to close that can run onunload is also useful for fixing
2469 // http://b/issue?id=753080. 2479 // http://b/issue?id=753080.
2470 webview()->mainFrame()->dispatchUnloadEvent(); 2480 webview()->mainFrame()->dispatchUnloadEvent();
2471 2481
2472 Send(new ViewHostMsg_ClosePage_ACK(GetRoutingID())); 2482 Send(new ViewHostMsg_ClosePage_ACK(GetRoutingID()));
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
2733 2743
2734 double RenderViewImpl::zoomLevelToZoomFactor(double zoom_level) const { 2744 double RenderViewImpl::zoomLevelToZoomFactor(double zoom_level) const {
2735 return ZoomLevelToZoomFactor(zoom_level); 2745 return ZoomLevelToZoomFactor(zoom_level);
2736 } 2746 }
2737 2747
2738 double RenderViewImpl::zoomFactorToZoomLevel(double factor) const { 2748 double RenderViewImpl::zoomFactorToZoomLevel(double factor) const {
2739 return ZoomFactorToZoomLevel(factor); 2749 return ZoomFactorToZoomLevel(factor);
2740 } 2750 }
2741 2751
2742 void RenderViewImpl::draggableRegionsChanged() { 2752 void RenderViewImpl::draggableRegionsChanged() {
2743 FOR_EACH_OBSERVER( 2753 for (auto& observer : observers_)
2744 RenderViewObserver, 2754 observer.DraggableRegionsChanged(webview()->mainFrame());
2745 observers_,
2746 DraggableRegionsChanged(webview()->mainFrame()));
2747 } 2755 }
2748 2756
2749 void RenderViewImpl::pageImportanceSignalsChanged() { 2757 void RenderViewImpl::pageImportanceSignalsChanged() {
2750 if (!webview() || !main_render_frame_) 2758 if (!webview() || !main_render_frame_)
2751 return; 2759 return;
2752 2760
2753 auto* web_signals = webview()->pageImportanceSignals(); 2761 auto* web_signals = webview()->pageImportanceSignals();
2754 2762
2755 PageImportanceSignals signals; 2763 PageImportanceSignals signals;
2756 signals.had_form_interaction = web_signals->hadFormInteraction(); 2764 signals.had_form_interaction = web_signals->hadFormInteraction();
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
2974 void RenderViewImpl::OnReleaseDisambiguationPopupBitmap( 2982 void RenderViewImpl::OnReleaseDisambiguationPopupBitmap(
2975 const cc::SharedBitmapId& id) { 2983 const cc::SharedBitmapId& id) {
2976 BitmapMap::iterator it = disambiguation_bitmaps_.find(id); 2984 BitmapMap::iterator it = disambiguation_bitmaps_.find(id);
2977 DCHECK(it != disambiguation_bitmaps_.end()); 2985 DCHECK(it != disambiguation_bitmaps_.end());
2978 delete it->second; 2986 delete it->second;
2979 disambiguation_bitmaps_.erase(it); 2987 disambiguation_bitmaps_.erase(it);
2980 } 2988 }
2981 2989
2982 void RenderViewImpl::DidCommitCompositorFrame() { 2990 void RenderViewImpl::DidCommitCompositorFrame() {
2983 RenderWidget::DidCommitCompositorFrame(); 2991 RenderWidget::DidCommitCompositorFrame();
2984 FOR_EACH_OBSERVER(RenderViewObserver, observers_, DidCommitCompositorFrame()); 2992 for (auto& observer : observers_)
2993 observer.DidCommitCompositorFrame();
2985 } 2994 }
2986 2995
2987 void RenderViewImpl::SendUpdateFaviconURL(const std::vector<FaviconURL>& urls) { 2996 void RenderViewImpl::SendUpdateFaviconURL(const std::vector<FaviconURL>& urls) {
2988 if (!urls.empty()) 2997 if (!urls.empty())
2989 Send(new ViewHostMsg_UpdateFaviconURL(GetRoutingID(), urls)); 2998 Send(new ViewHostMsg_UpdateFaviconURL(GetRoutingID(), urls));
2990 } 2999 }
2991 3000
2992 void RenderViewImpl::DidStopLoadingIcons() { 3001 void RenderViewImpl::DidStopLoadingIcons() {
2993 int icon_types = WebIconURL::TypeFavicon | WebIconURL::TypeTouchPrecomposed | 3002 int icon_types = WebIconURL::TypeFavicon | WebIconURL::TypeTouchPrecomposed |
2994 WebIconURL::TypeTouch; 3003 WebIconURL::TypeTouch;
(...skipping 24 matching lines...) Expand all
3019 if (IsUseZoomForDSFEnabled()) { 3028 if (IsUseZoomForDSFEnabled()) {
3020 webview()->setZoomFactorForDeviceScaleFactor(device_scale_factor_); 3029 webview()->setZoomFactorForDeviceScaleFactor(device_scale_factor_);
3021 } else { 3030 } else {
3022 webview()->setDeviceScaleFactor(device_scale_factor_); 3031 webview()->setDeviceScaleFactor(device_scale_factor_);
3023 } 3032 }
3024 webview()->settings()->setPreferCompositingToLCDTextEnabled( 3033 webview()->settings()->setPreferCompositingToLCDTextEnabled(
3025 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_)); 3034 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_));
3026 } 3035 }
3027 3036
3028 } // namespace content 3037 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_thread_impl.cc ('k') | content/renderer/render_widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698