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

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

Issue 2652643004: Make PageScaleFactor work for oopif subframes.
Patch Set: Put function prototype in correct place. Created 3 years, 10 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_frame_impl.h ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_frame_impl.h" 5 #include "content/renderer/render_frame_impl.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 #include "content/renderer/accessibility/render_accessibility_impl.h" 93 #include "content/renderer/accessibility/render_accessibility_impl.h"
94 #include "content/renderer/browser_plugin/browser_plugin.h" 94 #include "content/renderer/browser_plugin/browser_plugin.h"
95 #include "content/renderer/browser_plugin/browser_plugin_manager.h" 95 #include "content/renderer/browser_plugin/browser_plugin_manager.h"
96 #include "content/renderer/child_frame_compositing_helper.h" 96 #include "content/renderer/child_frame_compositing_helper.h"
97 #include "content/renderer/context_menu_params_builder.h" 97 #include "content/renderer/context_menu_params_builder.h"
98 #include "content/renderer/devtools/devtools_agent.h" 98 #include "content/renderer/devtools/devtools_agent.h"
99 #include "content/renderer/dom_automation_controller.h" 99 #include "content/renderer/dom_automation_controller.h"
100 #include "content/renderer/effective_connection_type_helper.h" 100 #include "content/renderer/effective_connection_type_helper.h"
101 #include "content/renderer/external_popup_menu.h" 101 #include "content/renderer/external_popup_menu.h"
102 #include "content/renderer/gpu/gpu_benchmarking_extension.h" 102 #include "content/renderer/gpu/gpu_benchmarking_extension.h"
103 #include "content/renderer/gpu/render_widget_compositor.h"
103 #include "content/renderer/history_controller.h" 104 #include "content/renderer/history_controller.h"
104 #include "content/renderer/history_serialization.h" 105 #include "content/renderer/history_serialization.h"
105 #include "content/renderer/image_downloader/image_downloader_impl.h" 106 #include "content/renderer/image_downloader/image_downloader_impl.h"
106 #include "content/renderer/ime_event_guard.h" 107 #include "content/renderer/ime_event_guard.h"
107 #include "content/renderer/input/input_handler_manager.h" 108 #include "content/renderer/input/input_handler_manager.h"
108 #include "content/renderer/internal_document_state_data.h" 109 #include "content/renderer/internal_document_state_data.h"
109 #include "content/renderer/manifest/manifest_manager.h" 110 #include "content/renderer/manifest/manifest_manager.h"
110 #include "content/renderer/media/audio_device_factory.h" 111 #include "content/renderer/media/audio_device_factory.h"
111 #include "content/renderer/media/media_devices_listener_impl.h" 112 #include "content/renderer/media/media_devices_listener_impl.h"
112 #include "content/renderer/media/media_permission_dispatcher.h" 113 #include "content/renderer/media/media_permission_dispatcher.h"
(...skipping 1455 matching lines...) Expand 10 before | Expand all | Expand 10 after
1568 OnGetSerializedHtmlWithLocalLinks) 1569 OnGetSerializedHtmlWithLocalLinks)
1569 IPC_MESSAGE_HANDLER(FrameMsg_SerializeAsMHTML, OnSerializeAsMHTML) 1570 IPC_MESSAGE_HANDLER(FrameMsg_SerializeAsMHTML, OnSerializeAsMHTML)
1570 IPC_MESSAGE_HANDLER(FrameMsg_Find, OnFind) 1571 IPC_MESSAGE_HANDLER(FrameMsg_Find, OnFind)
1571 IPC_MESSAGE_HANDLER(FrameMsg_ClearActiveFindMatch, OnClearActiveFindMatch) 1572 IPC_MESSAGE_HANDLER(FrameMsg_ClearActiveFindMatch, OnClearActiveFindMatch)
1572 IPC_MESSAGE_HANDLER(FrameMsg_StopFinding, OnStopFinding) 1573 IPC_MESSAGE_HANDLER(FrameMsg_StopFinding, OnStopFinding)
1573 IPC_MESSAGE_HANDLER(FrameMsg_EnableViewSourceMode, OnEnableViewSourceMode) 1574 IPC_MESSAGE_HANDLER(FrameMsg_EnableViewSourceMode, OnEnableViewSourceMode)
1574 IPC_MESSAGE_HANDLER(FrameMsg_SuppressFurtherDialogs, 1575 IPC_MESSAGE_HANDLER(FrameMsg_SuppressFurtherDialogs,
1575 OnSuppressFurtherDialogs) 1576 OnSuppressFurtherDialogs)
1576 IPC_MESSAGE_HANDLER(FrameMsg_RunFileChooserResponse, OnFileChooserResponse) 1577 IPC_MESSAGE_HANDLER(FrameMsg_RunFileChooserResponse, OnFileChooserResponse)
1577 IPC_MESSAGE_HANDLER(FrameMsg_ClearFocusedElement, OnClearFocusedElement) 1578 IPC_MESSAGE_HANDLER(FrameMsg_ClearFocusedElement, OnClearFocusedElement)
1579 IPC_MESSAGE_HANDLER(FrameMsg_SetPageScaleFactor,
1580 OnSetPageScaleFactorForSubframe);
1578 #if defined(OS_ANDROID) 1581 #if defined(OS_ANDROID)
1579 IPC_MESSAGE_HANDLER(FrameMsg_ActivateNearestFindResult, 1582 IPC_MESSAGE_HANDLER(FrameMsg_ActivateNearestFindResult,
1580 OnActivateNearestFindResult) 1583 OnActivateNearestFindResult)
1581 IPC_MESSAGE_HANDLER(FrameMsg_GetNearestFindResult, 1584 IPC_MESSAGE_HANDLER(FrameMsg_GetNearestFindResult,
1582 OnGetNearestFindResult) 1585 OnGetNearestFindResult)
1583 IPC_MESSAGE_HANDLER(FrameMsg_FindMatchRects, OnFindMatchRects) 1586 IPC_MESSAGE_HANDLER(FrameMsg_FindMatchRects, OnFindMatchRects)
1584 #endif 1587 #endif
1585 1588
1586 #if defined(USE_EXTERNAL_POPUP_MENU) 1589 #if defined(USE_EXTERNAL_POPUP_MENU)
1587 #if defined(OS_MACOSX) 1590 #if defined(OS_MACOSX)
(...skipping 2920 matching lines...) Expand 10 before | Expand all | Expand 10 after
4508 } 4511 }
4509 4512
4510 void RenderFrameImpl::didChangeScrollOffset(blink::WebLocalFrame* frame) { 4513 void RenderFrameImpl::didChangeScrollOffset(blink::WebLocalFrame* frame) {
4511 DCHECK_EQ(frame_, frame); 4514 DCHECK_EQ(frame_, frame);
4512 render_view_->StartNavStateSyncTimerIfNecessary(this); 4515 render_view_->StartNavStateSyncTimerIfNecessary(this);
4513 4516
4514 for (auto& observer : observers_) 4517 for (auto& observer : observers_)
4515 observer.DidChangeScrollOffset(); 4518 observer.DidChangeScrollOffset();
4516 } 4519 }
4517 4520
4521 void RenderFrameImpl::didRestorePageScaleFactorOnLoad(float page_scale) {
4522 // Notify the web contents so it can update cross-process frames.
4523 Send(new FrameHostMsg_RestorePageScaleFactorOnLoad(routing_id_, page_scale));
4524 }
4525
4518 void RenderFrameImpl::willInsertBody(blink::WebLocalFrame* frame) { 4526 void RenderFrameImpl::willInsertBody(blink::WebLocalFrame* frame) {
4519 DCHECK(!frame_ || frame_ == frame); 4527 DCHECK(!frame_ || frame_ == frame);
4520 if (!frame->parent()) { 4528 if (!frame->parent()) {
4521 render_view_->Send(new ViewHostMsg_WillInsertBody( 4529 render_view_->Send(new ViewHostMsg_WillInsertBody(
4522 render_view_->GetRoutingID())); 4530 render_view_->GetRoutingID()));
4523 } 4531 }
4524 } 4532 }
4525 4533
4526 void RenderFrameImpl::reportFindInPageMatchCount(int request_id, 4534 void RenderFrameImpl::reportFindInPageMatchCount(int request_id,
4527 int count, 4535 int count,
(...skipping 2350 matching lines...) Expand 10 before | Expand all | Expand 10 after
6878 // And then the mouse event is forwarded to blink, which dispatches it to the 6886 // And then the mouse event is forwarded to blink, which dispatches it to the
6879 // event target. Potentially a Pepper plugin will receive the event. 6887 // event target. Potentially a Pepper plugin will receive the event.
6880 // In order to tell whether a plugin gets the last mouse event and which it 6888 // In order to tell whether a plugin gets the last mouse event and which it
6881 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets 6889 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets
6882 // the event, it will notify us via DidReceiveMouseEvent() and set itself as 6890 // the event, it will notify us via DidReceiveMouseEvent() and set itself as
6883 // |pepper_last_mouse_event_target_|. 6891 // |pepper_last_mouse_event_target_|.
6884 pepper_last_mouse_event_target_ = nullptr; 6892 pepper_last_mouse_event_target_ = nullptr;
6885 #endif 6893 #endif
6886 } 6894 }
6887 6895
6896 void RenderFrameImpl::OnSetPageScaleFactorForSubframe(
6897 double page_scale_factor) {
6898 if (is_main_frame_) {
6899 NOTREACHED();
6900 return;
6901 }
6902
6903 RenderWidgetCompositor* widget_compositor = GetRenderWidget()->compositor();
6904 if (widget_compositor)
6905 widget_compositor->SetPageScaleFactorForSubframe(page_scale_factor);
6906 }
6907
6888 } // namespace content 6908 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_frame_impl.h ('k') | content/renderer/render_widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698