| Index: content/browser/renderer_host/render_view_host_impl.cc
|
| diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
|
| index 0a95825d377ef661e08741cce3484062ee154631..81747af60f5b7ce6e1842ef62b083433ae0df20e 100644
|
| --- a/content/browser/renderer_host/render_view_host_impl.cc
|
| +++ b/content/browser/renderer_host/render_view_host_impl.cc
|
| @@ -1007,6 +1007,8 @@ bool RenderViewHostImpl::OnMessageReceived(const IPC::Message& msg) {
|
| IPC_MESSAGE_HANDLER(ViewHostMsg_SelectionRootBoundsChanged,
|
| OnSelectionRootBoundsChanged)
|
| #endif
|
| + IPC_MESSAGE_HANDLER(ViewHostMsg_DidCreateDocument,
|
| + OnDidCreateDocument)
|
| IPC_MESSAGE_HANDLER(ViewHostMsg_DidZoomURL, OnDidZoomURL)
|
| #if defined(OS_MACOSX) || defined(OS_ANDROID)
|
| IPC_MESSAGE_HANDLER(ViewHostMsg_ShowPopup, OnShowPopup)
|
| @@ -1184,8 +1186,10 @@ void RenderViewHostImpl::OnRequestMove(const gfx::Rect& pos) {
|
| Send(new ViewMsg_Move_ACK(GetRoutingID()));
|
| }
|
|
|
| -void RenderViewHostImpl::OnDocumentAvailableInMainFrame() {
|
| +void RenderViewHostImpl::OnDocumentAvailableInMainFrame(
|
| + bool uses_temporary_zoom_settings) {
|
| delegate_->DocumentAvailableInMainFrame(this);
|
| + OnDidCreateDocument(uses_temporary_zoom_settings);
|
| }
|
|
|
| void RenderViewHostImpl::OnToggleFullscreen(bool enter_fullscreen) {
|
| @@ -1593,18 +1597,23 @@ void RenderViewHostImpl::OnAccessibilityLocationChanges(
|
| }
|
| }
|
|
|
| +void RenderViewHostImpl::OnDidCreateDocument(
|
| + bool uses_temporary_zoom_settings) {
|
| + HostZoomMapImpl* host_zoom_map = static_cast<HostZoomMapImpl*>(
|
| + HostZoomMap::GetForBrowserContext(GetProcess()->GetBrowserContext()));
|
| + host_zoom_map->SetUsesTemporaryZoomLevel(
|
| + GetProcess()->GetID(), GetRoutingID(), uses_temporary_zoom_settings);
|
| +}
|
| +
|
| void RenderViewHostImpl::OnDidZoomURL(double zoom_level,
|
| - bool remember,
|
| const GURL& url) {
|
| HostZoomMapImpl* host_zoom_map = static_cast<HostZoomMapImpl*>(
|
| HostZoomMap::GetForBrowserContext(GetProcess()->GetBrowserContext()));
|
| - if (remember) {
|
| - host_zoom_map->
|
| - SetZoomLevelForHost(net::GetHostOrSpecFromURL(url), zoom_level);
|
| - } else {
|
| - host_zoom_map->SetTemporaryZoomLevel(
|
| - GetProcess()->GetID(), GetRoutingID(), zoom_level);
|
| - }
|
| +
|
| + host_zoom_map->SetZoomLevelForView(GetProcess()->GetID(),
|
| + GetRoutingID(),
|
| + zoom_level,
|
| + net::GetHostOrSpecFromURL(url));
|
| }
|
|
|
| void RenderViewHostImpl::OnRunFileChooser(const FileChooserParams& params) {
|
|
|