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

Side by Side Diff: content/browser/frame_host/render_frame_host_impl.cc

Issue 1488653002: Fix scroll restoration when exiting fullscreen mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Accidentally made will_cause_resize always false in previous cleanup. Fixed Created 4 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
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/browser/frame_host/render_frame_host_impl.h" 5 #include "content/browser/frame_host/render_frame_host_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/containers/hash_tables.h" 10 #include "base/containers/hash_tables.h"
(...skipping 1666 matching lines...) Expand 10 before | Expand all | Expand 10 after
1677 ax_tree_snapshot_callbacks_.erase(it); 1677 ax_tree_snapshot_callbacks_.erase(it);
1678 } else { 1678 } else {
1679 NOTREACHED() << "Received AX tree snapshot response for unknown id"; 1679 NOTREACHED() << "Received AX tree snapshot response for unknown id";
1680 } 1680 }
1681 } 1681 }
1682 1682
1683 void RenderFrameHostImpl::OnToggleFullscreen(bool enter_fullscreen) { 1683 void RenderFrameHostImpl::OnToggleFullscreen(bool enter_fullscreen) {
1684 if (enter_fullscreen) 1684 if (enter_fullscreen)
1685 delegate_->EnterFullscreenMode(GetLastCommittedURL().GetOrigin()); 1685 delegate_->EnterFullscreenMode(GetLastCommittedURL().GetOrigin());
1686 else 1686 else
1687 delegate_->ExitFullscreenMode(); 1687 delegate_->ExitFullscreenMode(/* will_cause_resize */ true);
1688 1688
1689 // The previous call might change the fullscreen state. We need to make sure 1689 // The previous call might change the fullscreen state. We need to make sure
1690 // the renderer is aware of that, which is done via the resize message. 1690 // the renderer is aware of that, which is done via the resize message.
1691 render_view_host_->GetWidget()->WasResized(); 1691 render_view_host_->GetWidget()->WasResized();
1692 } 1692 }
1693 1693
1694 void RenderFrameHostImpl::OnDidStartLoading(bool to_different_document) { 1694 void RenderFrameHostImpl::OnDidStartLoading(bool to_different_document) {
1695 // Any main frame load to a new document should reset the load since it will 1695 // Any main frame load to a new document should reset the load since it will
1696 // replace the current page and any frames. 1696 // replace the current page and any frames.
1697 if (to_different_document && !GetParent()) 1697 if (to_different_document && !GetParent())
(...skipping 854 matching lines...) Expand 10 before | Expand all | Expand 10 after
2552 *dst = src; 2552 *dst = src;
2553 2553
2554 if (src.routing_id != -1) 2554 if (src.routing_id != -1)
2555 dst->tree_id = RoutingIDToAXTreeID(src.routing_id); 2555 dst->tree_id = RoutingIDToAXTreeID(src.routing_id);
2556 2556
2557 if (src.parent_routing_id != -1) 2557 if (src.parent_routing_id != -1)
2558 dst->parent_tree_id = RoutingIDToAXTreeID(src.parent_routing_id); 2558 dst->parent_tree_id = RoutingIDToAXTreeID(src.parent_routing_id);
2559 } 2559 }
2560 2560
2561 } // namespace content 2561 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/render_frame_host_delegate.h ('k') | content/browser/web_contents/web_contents_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698