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 #include <memory> | 9 #include <memory> |
10 | 10 |
(...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
624 frames_in_progress_(0), | 624 frames_in_progress_(0), |
625 target_url_status_(TARGET_NONE), | 625 target_url_status_(TARGET_NONE), |
626 uses_temporary_zoom_level_(false), | 626 uses_temporary_zoom_level_(false), |
627 #if defined(OS_ANDROID) | 627 #if defined(OS_ANDROID) |
628 top_controls_constraints_(TOP_CONTROLS_STATE_BOTH), | 628 top_controls_constraints_(TOP_CONTROLS_STATE_BOTH), |
629 #endif | 629 #endif |
630 top_controls_shrink_blink_size_(false), | 630 top_controls_shrink_blink_size_(false), |
631 top_controls_height_(0.f), | 631 top_controls_height_(0.f), |
632 has_focus_(false), | 632 has_focus_(false), |
633 has_scrolled_focused_editable_node_into_rect_(false), | 633 has_scrolled_focused_editable_node_into_rect_(false), |
| 634 page_zoom_level_(params.page_zoom_level), |
634 main_render_frame_(nullptr), | 635 main_render_frame_(nullptr), |
635 frame_widget_(nullptr), | 636 frame_widget_(nullptr), |
636 speech_recognition_dispatcher_(NULL), | 637 speech_recognition_dispatcher_(NULL), |
637 mouse_lock_dispatcher_(NULL), | 638 mouse_lock_dispatcher_(NULL), |
638 #if defined(OS_ANDROID) | 639 #if defined(OS_ANDROID) |
639 expected_content_intent_id_(0), | 640 expected_content_intent_id_(0), |
640 #endif | 641 #endif |
641 #if defined(ENABLE_PLUGINS) | 642 #if defined(ENABLE_PLUGINS) |
642 focused_pepper_plugin_(NULL), | 643 focused_pepper_plugin_(NULL), |
643 pepper_last_mouse_event_target_(NULL), | 644 pepper_last_mouse_event_target_(NULL), |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
794 | 795 |
795 GetContentClient()->renderer()->RenderViewCreated(this); | 796 GetContentClient()->renderer()->RenderViewCreated(this); |
796 | 797 |
797 // Ensure that sandbox flags are inherited from an opener in a different | 798 // Ensure that sandbox flags are inherited from an opener in a different |
798 // process. In that case, the browser process will set any inherited sandbox | 799 // process. In that case, the browser process will set any inherited sandbox |
799 // flags in |replicated_frame_state|, so apply them here. | 800 // flags in |replicated_frame_state|, so apply them here. |
800 if (!was_created_by_renderer && webview()->mainFrame()->isWebLocalFrame()) { | 801 if (!was_created_by_renderer && webview()->mainFrame()->isWebLocalFrame()) { |
801 webview()->mainFrame()->toWebLocalFrame()->forceSandboxFlags( | 802 webview()->mainFrame()->toWebLocalFrame()->forceSandboxFlags( |
802 params.replicated_frame_state.sandbox_flags); | 803 params.replicated_frame_state.sandbox_flags); |
803 } | 804 } |
| 805 |
| 806 page_zoom_level_ = params.page_zoom_level; |
804 } | 807 } |
805 | 808 |
806 RenderViewImpl::~RenderViewImpl() { | 809 RenderViewImpl::~RenderViewImpl() { |
807 DCHECK(!frame_widget_); | 810 DCHECK(!frame_widget_); |
808 | 811 |
809 for (BitmapMap::iterator it = disambiguation_bitmaps_.begin(); | 812 for (BitmapMap::iterator it = disambiguation_bitmaps_.begin(); |
810 it != disambiguation_bitmaps_.end(); | 813 it != disambiguation_bitmaps_.end(); |
811 ++it) | 814 ++it) |
812 delete it->second; | 815 delete it->second; |
813 | 816 |
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1296 IPC_MESSAGE_HANDLER(InputMsg_ScrollFocusedEditableNodeIntoRect, | 1299 IPC_MESSAGE_HANDLER(InputMsg_ScrollFocusedEditableNodeIntoRect, |
1297 OnScrollFocusedEditableNodeIntoRect) | 1300 OnScrollFocusedEditableNodeIntoRect) |
1298 IPC_MESSAGE_HANDLER(InputMsg_SetEditCommandsForNextKeyEvent, | 1301 IPC_MESSAGE_HANDLER(InputMsg_SetEditCommandsForNextKeyEvent, |
1299 OnSetEditCommandsForNextKeyEvent) | 1302 OnSetEditCommandsForNextKeyEvent) |
1300 IPC_MESSAGE_HANDLER(ViewMsg_CopyImageAt, OnCopyImageAt) | 1303 IPC_MESSAGE_HANDLER(ViewMsg_CopyImageAt, OnCopyImageAt) |
1301 IPC_MESSAGE_HANDLER(ViewMsg_SaveImageAt, OnSaveImageAt) | 1304 IPC_MESSAGE_HANDLER(ViewMsg_SaveImageAt, OnSaveImageAt) |
1302 IPC_MESSAGE_HANDLER(ViewMsg_SetPageScale, OnSetPageScale) | 1305 IPC_MESSAGE_HANDLER(ViewMsg_SetPageScale, OnSetPageScale) |
1303 IPC_MESSAGE_HANDLER(ViewMsg_Zoom, OnZoom) | 1306 IPC_MESSAGE_HANDLER(ViewMsg_Zoom, OnZoom) |
1304 IPC_MESSAGE_HANDLER(ViewMsg_SetZoomLevelForLoadingURL, | 1307 IPC_MESSAGE_HANDLER(ViewMsg_SetZoomLevelForLoadingURL, |
1305 OnSetZoomLevelForLoadingURL) | 1308 OnSetZoomLevelForLoadingURL) |
1306 IPC_MESSAGE_HANDLER(ViewMsg_SetZoomLevelForView, | |
1307 OnSetZoomLevelForView) | |
1308 IPC_MESSAGE_HANDLER(ViewMsg_SetPageEncoding, OnSetPageEncoding) | 1309 IPC_MESSAGE_HANDLER(ViewMsg_SetPageEncoding, OnSetPageEncoding) |
1309 IPC_MESSAGE_HANDLER(ViewMsg_ResetPageEncodingToDefault, | 1310 IPC_MESSAGE_HANDLER(ViewMsg_ResetPageEncodingToDefault, |
1310 OnResetPageEncodingToDefault) | 1311 OnResetPageEncodingToDefault) |
1311 IPC_MESSAGE_HANDLER(DragMsg_TargetDragEnter, OnDragTargetDragEnter) | 1312 IPC_MESSAGE_HANDLER(DragMsg_TargetDragEnter, OnDragTargetDragEnter) |
1312 IPC_MESSAGE_HANDLER(DragMsg_TargetDragOver, OnDragTargetDragOver) | 1313 IPC_MESSAGE_HANDLER(DragMsg_TargetDragOver, OnDragTargetDragOver) |
1313 IPC_MESSAGE_HANDLER(DragMsg_TargetDragLeave, OnDragTargetDragLeave) | 1314 IPC_MESSAGE_HANDLER(DragMsg_TargetDragLeave, OnDragTargetDragLeave) |
1314 IPC_MESSAGE_HANDLER(DragMsg_TargetDrop, OnDragTargetDrop) | 1315 IPC_MESSAGE_HANDLER(DragMsg_TargetDrop, OnDragTargetDrop) |
1315 IPC_MESSAGE_HANDLER(DragMsg_SourceEnded, OnDragSourceEnded) | 1316 IPC_MESSAGE_HANDLER(DragMsg_SourceEnded, OnDragSourceEnded) |
1316 IPC_MESSAGE_HANDLER(DragMsg_SourceSystemDragEnded, | 1317 IPC_MESSAGE_HANDLER(DragMsg_SourceSystemDragEnded, |
1317 OnDragSourceSystemDragEnded) | 1318 OnDragSourceSystemDragEnded) |
(...skipping 20 matching lines...) Expand all Loading... |
1338 IPC_MESSAGE_HANDLER(ViewMsg_PluginActionAt, OnPluginActionAt) | 1339 IPC_MESSAGE_HANDLER(ViewMsg_PluginActionAt, OnPluginActionAt) |
1339 IPC_MESSAGE_HANDLER(ViewMsg_SetActive, OnSetActive) | 1340 IPC_MESSAGE_HANDLER(ViewMsg_SetActive, OnSetActive) |
1340 IPC_MESSAGE_HANDLER(ViewMsg_ShowContextMenu, OnShowContextMenu) | 1341 IPC_MESSAGE_HANDLER(ViewMsg_ShowContextMenu, OnShowContextMenu) |
1341 // TODO(viettrungluu): Move to a separate message filter. | 1342 // TODO(viettrungluu): Move to a separate message filter. |
1342 IPC_MESSAGE_HANDLER(ViewMsg_SetHistoryOffsetAndLength, | 1343 IPC_MESSAGE_HANDLER(ViewMsg_SetHistoryOffsetAndLength, |
1343 OnSetHistoryOffsetAndLength) | 1344 OnSetHistoryOffsetAndLength) |
1344 IPC_MESSAGE_HANDLER(ViewMsg_ReleaseDisambiguationPopupBitmap, | 1345 IPC_MESSAGE_HANDLER(ViewMsg_ReleaseDisambiguationPopupBitmap, |
1345 OnReleaseDisambiguationPopupBitmap) | 1346 OnReleaseDisambiguationPopupBitmap) |
1346 IPC_MESSAGE_HANDLER(ViewMsg_ForceRedraw, OnForceRedraw) | 1347 IPC_MESSAGE_HANDLER(ViewMsg_ForceRedraw, OnForceRedraw) |
1347 IPC_MESSAGE_HANDLER(ViewMsg_SelectWordAroundCaret, OnSelectWordAroundCaret) | 1348 IPC_MESSAGE_HANDLER(ViewMsg_SelectWordAroundCaret, OnSelectWordAroundCaret) |
| 1349 |
| 1350 // Page messages. |
1348 IPC_MESSAGE_HANDLER(PageMsg_UpdateWindowScreenRect, | 1351 IPC_MESSAGE_HANDLER(PageMsg_UpdateWindowScreenRect, |
1349 OnUpdateWindowScreenRect) | 1352 OnUpdateWindowScreenRect) |
| 1353 IPC_MESSAGE_HANDLER(PageMsg_SetZoomLevel, OnSetZoomLevel) |
1350 #if defined(OS_ANDROID) | 1354 #if defined(OS_ANDROID) |
1351 IPC_MESSAGE_HANDLER(ViewMsg_UpdateTopControlsState, | 1355 IPC_MESSAGE_HANDLER(ViewMsg_UpdateTopControlsState, |
1352 OnUpdateTopControlsState) | 1356 OnUpdateTopControlsState) |
1353 IPC_MESSAGE_HANDLER(ViewMsg_ExtractSmartClipData, OnExtractSmartClipData) | 1357 IPC_MESSAGE_HANDLER(ViewMsg_ExtractSmartClipData, OnExtractSmartClipData) |
1354 #elif defined(OS_MACOSX) | 1358 #elif defined(OS_MACOSX) |
1355 IPC_MESSAGE_HANDLER(ViewMsg_GetRenderedText, | 1359 IPC_MESSAGE_HANDLER(ViewMsg_GetRenderedText, |
1356 OnGetRenderedText) | 1360 OnGetRenderedText) |
1357 IPC_MESSAGE_HANDLER(ViewMsg_Close, OnClose) | 1361 IPC_MESSAGE_HANDLER(ViewMsg_Close, OnClose) |
1358 #endif | 1362 #endif |
1359 // Adding a new message? Add platform independent ones first, then put the | 1363 // Adding a new message? Add platform independent ones first, then put the |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1594 view_params.swapped_out = false; | 1598 view_params.swapped_out = false; |
1595 // WebCore will take care of setting the correct name. | 1599 // WebCore will take care of setting the correct name. |
1596 view_params.replicated_frame_state = FrameReplicationState(); | 1600 view_params.replicated_frame_state = FrameReplicationState(); |
1597 view_params.hidden = (params.disposition == NEW_BACKGROUND_TAB); | 1601 view_params.hidden = (params.disposition == NEW_BACKGROUND_TAB); |
1598 view_params.never_visible = never_visible; | 1602 view_params.never_visible = never_visible; |
1599 view_params.next_page_id = 1; | 1603 view_params.next_page_id = 1; |
1600 view_params.initial_size = initial_size; | 1604 view_params.initial_size = initial_size; |
1601 view_params.enable_auto_resize = false; | 1605 view_params.enable_auto_resize = false; |
1602 view_params.min_size = gfx::Size(); | 1606 view_params.min_size = gfx::Size(); |
1603 view_params.max_size = gfx::Size(); | 1607 view_params.max_size = gfx::Size(); |
| 1608 view_params.page_zoom_level = page_zoom_level_; |
1604 | 1609 |
1605 RenderViewImpl* view = | 1610 RenderViewImpl* view = |
1606 RenderViewImpl::Create(compositor_deps_, view_params, true); | 1611 RenderViewImpl::Create(compositor_deps_, view_params, true); |
1607 view->opened_by_user_gesture_ = params.user_gesture; | 1612 view->opened_by_user_gesture_ = params.user_gesture; |
1608 | 1613 |
1609 return view->webview(); | 1614 return view->webview(); |
1610 } | 1615 } |
1611 | 1616 |
1612 WebWidget* RenderViewImpl::createPopupMenu(blink::WebPopupType popup_type) { | 1617 WebWidget* RenderViewImpl::createPopupMenu(blink::WebPopupType popup_type) { |
1613 RenderWidget* widget = RenderWidget::Create(GetRoutingID(), compositor_deps_, | 1618 RenderWidget* widget = RenderWidget::Create(GetRoutingID(), compositor_deps_, |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1667 } | 1672 } |
1668 } | 1673 } |
1669 | 1674 |
1670 void RenderViewImpl::AttachWebFrameWidget(blink::WebFrameWidget* frame_widget) { | 1675 void RenderViewImpl::AttachWebFrameWidget(blink::WebFrameWidget* frame_widget) { |
1671 // The previous WebFrameWidget must already be detached by CloseForFrame(). | 1676 // The previous WebFrameWidget must already be detached by CloseForFrame(). |
1672 DCHECK(!frame_widget_); | 1677 DCHECK(!frame_widget_); |
1673 frame_widget_ = frame_widget; | 1678 frame_widget_ = frame_widget; |
1674 } | 1679 } |
1675 | 1680 |
1676 void RenderViewImpl::SetZoomLevel(double zoom_level) { | 1681 void RenderViewImpl::SetZoomLevel(double zoom_level) { |
| 1682 // If we change the zoom level for the view, make sure any subsequent subframe |
| 1683 // loads reflect the current zoom level. |
| 1684 page_zoom_level_ = zoom_level; |
| 1685 |
1677 webview()->setZoomLevel(zoom_level); | 1686 webview()->setZoomLevel(zoom_level); |
1678 FOR_EACH_OBSERVER(RenderViewObserver, observers_, OnZoomLevelChanged()); | 1687 FOR_EACH_OBSERVER(RenderViewObserver, observers_, OnZoomLevelChanged()); |
1679 } | 1688 } |
1680 | 1689 |
1681 void RenderViewImpl::didCancelCompositionOnSelectionChange() { | 1690 void RenderViewImpl::didCancelCompositionOnSelectionChange() { |
1682 Send(new InputHostMsg_ImeCancelComposition(GetRoutingID())); | 1691 Send(new InputHostMsg_ImeCancelComposition(GetRoutingID())); |
1683 } | 1692 } |
1684 | 1693 |
1685 bool RenderViewImpl::handleCurrentKeyboardEvent() { | 1694 bool RenderViewImpl::handleCurrentKeyboardEvent() { |
1686 if (edit_commands_.empty()) | 1695 if (edit_commands_.empty()) |
(...skipping 687 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2374 // We're going towards 100%, so first go to the next whole number. | 2383 // We're going towards 100%, so first go to the next whole number. |
2375 zoom_level = static_cast<int>(old_zoom_level); | 2384 zoom_level = static_cast<int>(old_zoom_level); |
2376 } | 2385 } |
2377 } | 2386 } |
2378 SetZoomLevel(zoom_level); | 2387 SetZoomLevel(zoom_level); |
2379 zoomLevelChanged(); | 2388 zoomLevelChanged(); |
2380 } | 2389 } |
2381 | 2390 |
2382 void RenderViewImpl::OnSetZoomLevelForLoadingURL(const GURL& url, | 2391 void RenderViewImpl::OnSetZoomLevelForLoadingURL(const GURL& url, |
2383 double zoom_level) { | 2392 double zoom_level) { |
| 2393 // TODO(wjmaclean): We should see if this restriction is really necessary, |
| 2394 // since it isn't enforced in other parts of the page zoom system (e.g. |
| 2395 // when a users changes the zoom of a currently displayed page). Android |
| 2396 // has no UI for this, so in theory the following code would normally just use |
| 2397 // the default zoom anyways. |
2384 #if !defined(OS_ANDROID) | 2398 #if !defined(OS_ANDROID) |
2385 // On Android, page zoom isn't used, and in case of WebView, text zoom is used | 2399 // On Android, page zoom isn't used, and in case of WebView, text zoom is used |
2386 // for legacy WebView text scaling emulation. Thus, the code that resets | 2400 // for legacy WebView text scaling emulation. Thus, the code that resets |
2387 // the zoom level from this map will be effectively resetting text zoom level. | 2401 // the zoom level from this map will be effectively resetting text zoom level. |
2388 host_zoom_levels_[url] = zoom_level; | 2402 host_zoom_levels_[url] = zoom_level; |
2389 #endif | 2403 #endif |
2390 } | 2404 } |
2391 | 2405 |
2392 void RenderViewImpl::OnSetZoomLevelForView(bool uses_temporary_zoom_level, | 2406 void RenderViewImpl::OnSetZoomLevel( |
2393 double level) { | 2407 PageMsg_SetZoomLevel_Command command, |
2394 uses_temporary_zoom_level_ = uses_temporary_zoom_level; | 2408 double zoom_level) { |
2395 | 2409 switch (command) { |
| 2410 case PageMsg_SetZoomLevel_Command::CLEAR_TEMPORARY: |
| 2411 uses_temporary_zoom_level_ = false; |
| 2412 break; |
| 2413 case PageMsg_SetZoomLevel_Command::SET_TEMPORARY: |
| 2414 uses_temporary_zoom_level_ = true; |
| 2415 break; |
| 2416 case PageMsg_SetZoomLevel_Command::USE_CURRENT_TEMPORARY_MODE: |
| 2417 // Don't override a temporary zoom level without an explicit SET. |
| 2418 if (uses_temporary_zoom_level_) |
| 2419 return; |
| 2420 break; |
| 2421 default: |
| 2422 NOTIMPLEMENTED(); |
| 2423 } |
2396 webview()->hidePopups(); | 2424 webview()->hidePopups(); |
2397 SetZoomLevel(level); | 2425 SetZoomLevel(zoom_level); |
2398 } | 2426 } |
2399 | 2427 |
2400 void RenderViewImpl::OnSetPageEncoding(const std::string& encoding_name) { | 2428 void RenderViewImpl::OnSetPageEncoding(const std::string& encoding_name) { |
2401 webview()->setPageEncoding(WebString::fromUTF8(encoding_name)); | 2429 webview()->setPageEncoding(WebString::fromUTF8(encoding_name)); |
2402 } | 2430 } |
2403 | 2431 |
2404 void RenderViewImpl::OnResetPageEncodingToDefault() { | 2432 void RenderViewImpl::OnResetPageEncodingToDefault() { |
2405 WebString no_encoding; | 2433 WebString no_encoding; |
2406 webview()->setPageEncoding(no_encoding); | 2434 webview()->setPageEncoding(no_encoding); |
2407 } | 2435 } |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2577 didUpdateLayout(); | 2605 didUpdateLayout(); |
2578 } | 2606 } |
2579 | 2607 |
2580 void RenderViewImpl::OnDisableScrollbarsForSmallWindows( | 2608 void RenderViewImpl::OnDisableScrollbarsForSmallWindows( |
2581 const gfx::Size& disable_scrollbar_size_limit) { | 2609 const gfx::Size& disable_scrollbar_size_limit) { |
2582 disable_scrollbars_size_limit_ = disable_scrollbar_size_limit; | 2610 disable_scrollbars_size_limit_ = disable_scrollbar_size_limit; |
2583 } | 2611 } |
2584 | 2612 |
2585 void RenderViewImpl::OnSetRendererPrefs( | 2613 void RenderViewImpl::OnSetRendererPrefs( |
2586 const RendererPreferences& renderer_prefs) { | 2614 const RendererPreferences& renderer_prefs) { |
2587 double old_zoom_level = renderer_preferences_.default_zoom_level; | |
2588 std::string old_accept_languages = renderer_preferences_.accept_languages; | 2615 std::string old_accept_languages = renderer_preferences_.accept_languages; |
2589 | 2616 |
2590 renderer_preferences_ = renderer_prefs; | 2617 renderer_preferences_ = renderer_prefs; |
2591 | 2618 |
2592 UpdateFontRenderingFromRendererPrefs(); | 2619 UpdateFontRenderingFromRendererPrefs(); |
2593 UpdateThemePrefs(); | 2620 UpdateThemePrefs(); |
2594 | 2621 |
2595 #if defined(USE_DEFAULT_RENDER_THEME) | 2622 #if defined(USE_DEFAULT_RENDER_THEME) |
2596 if (renderer_prefs.use_custom_colors) { | 2623 if (renderer_prefs.use_custom_colors) { |
2597 blink::setFocusRingColor(renderer_prefs.focus_ring_color); | 2624 blink::setFocusRingColor(renderer_prefs.focus_ring_color); |
2598 blink::setCaretBlinkInterval(renderer_prefs.caret_blink_interval); | 2625 blink::setCaretBlinkInterval(renderer_prefs.caret_blink_interval); |
2599 | 2626 |
2600 if (webview()) { | 2627 if (webview()) { |
2601 webview()->setSelectionColors( | 2628 webview()->setSelectionColors( |
2602 renderer_prefs.active_selection_bg_color, | 2629 renderer_prefs.active_selection_bg_color, |
2603 renderer_prefs.active_selection_fg_color, | 2630 renderer_prefs.active_selection_fg_color, |
2604 renderer_prefs.inactive_selection_bg_color, | 2631 renderer_prefs.inactive_selection_bg_color, |
2605 renderer_prefs.inactive_selection_fg_color); | 2632 renderer_prefs.inactive_selection_fg_color); |
2606 webview()->themeChanged(); | 2633 webview()->themeChanged(); |
2607 } | 2634 } |
2608 } | 2635 } |
2609 #endif // defined(USE_DEFAULT_RENDER_THEME) | 2636 #endif // defined(USE_DEFAULT_RENDER_THEME) |
2610 | 2637 |
2611 // If the zoom level for this page matches the old zoom default, and this | |
2612 // is not a plugin, update the zoom level to match the new default. | |
2613 if (webview() && webview()->mainFrame()->isWebLocalFrame() && | |
2614 !webview()->mainFrame()->document().isPluginDocument() && | |
2615 !ZoomValuesEqual(old_zoom_level, | |
2616 renderer_preferences_.default_zoom_level) && | |
2617 ZoomValuesEqual(webview()->zoomLevel(), old_zoom_level)) { | |
2618 SetZoomLevel(renderer_preferences_.default_zoom_level); | |
2619 zoomLevelChanged(); | |
2620 } | |
2621 | |
2622 if (webview() && | 2638 if (webview() && |
2623 old_accept_languages != renderer_preferences_.accept_languages) { | 2639 old_accept_languages != renderer_preferences_.accept_languages) { |
2624 webview()->acceptLanguagesChanged(); | 2640 webview()->acceptLanguagesChanged(); |
2625 } | 2641 } |
2626 } | 2642 } |
2627 | 2643 |
2628 void RenderViewImpl::OnMediaPlayerActionAt(const gfx::Point& location, | 2644 void RenderViewImpl::OnMediaPlayerActionAt(const gfx::Point& location, |
2629 const WebMediaPlayerAction& action) { | 2645 const WebMediaPlayerAction& action) { |
2630 if (webview()) | 2646 if (webview()) |
2631 webview()->performMediaPlayerAction(action, location); | 2647 webview()->performMediaPlayerAction(action, location); |
(...skipping 780 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3412 if (IsUseZoomForDSFEnabled()) { | 3428 if (IsUseZoomForDSFEnabled()) { |
3413 webview()->setZoomFactorForDeviceScaleFactor(device_scale_factor_); | 3429 webview()->setZoomFactorForDeviceScaleFactor(device_scale_factor_); |
3414 } else { | 3430 } else { |
3415 webview()->setDeviceScaleFactor(device_scale_factor_); | 3431 webview()->setDeviceScaleFactor(device_scale_factor_); |
3416 } | 3432 } |
3417 webview()->settings()->setPreferCompositingToLCDTextEnabled( | 3433 webview()->settings()->setPreferCompositingToLCDTextEnabled( |
3418 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_)); | 3434 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_)); |
3419 } | 3435 } |
3420 | 3436 |
3421 } // namespace content | 3437 } // namespace content |
OLD | NEW |