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

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: Addressed comments from scheib@ Created 4 years, 11 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 1649 matching lines...) Expand 10 before | Expand all | Expand 10 after
1660 ax_tree_snapshot_callbacks_.erase(it); 1660 ax_tree_snapshot_callbacks_.erase(it);
1661 } else { 1661 } else {
1662 NOTREACHED() << "Received AX tree snapshot response for unknown id"; 1662 NOTREACHED() << "Received AX tree snapshot response for unknown id";
1663 } 1663 }
1664 } 1664 }
1665 1665
1666 void RenderFrameHostImpl::OnToggleFullscreen(bool enter_fullscreen) { 1666 void RenderFrameHostImpl::OnToggleFullscreen(bool enter_fullscreen) {
1667 if (enter_fullscreen) 1667 if (enter_fullscreen)
1668 delegate_->EnterFullscreenMode(GetLastCommittedURL().GetOrigin()); 1668 delegate_->EnterFullscreenMode(GetLastCommittedURL().GetOrigin());
1669 else 1669 else
1670 delegate_->ExitFullscreenMode(); 1670 delegate_->ExitFullscreenMode(/* will_cause_resize */ true);
1671 1671
1672 // The previous call might change the fullscreen state. We need to make sure 1672 // The previous call might change the fullscreen state. We need to make sure
1673 // the renderer is aware of that, which is done via the resize message. 1673 // the renderer is aware of that, which is done via the resize message.
1674 render_view_host_->GetWidget()->WasResized(); 1674 render_view_host_->GetWidget()->WasResized();
1675 } 1675 }
1676 1676
1677 void RenderFrameHostImpl::OnDidStartLoading(bool to_different_document) { 1677 void RenderFrameHostImpl::OnDidStartLoading(bool to_different_document) {
1678 // Any main frame load to a new document should reset the load since it will 1678 // Any main frame load to a new document should reset the load since it will
1679 // replace the current page and any frames. 1679 // replace the current page and any frames.
1680 if (to_different_document && !GetParent()) 1680 if (to_different_document && !GetParent())
(...skipping 843 matching lines...) Expand 10 before | Expand all | Expand 10 after
2524 *dst = src; 2524 *dst = src;
2525 2525
2526 if (src.routing_id != -1) 2526 if (src.routing_id != -1)
2527 dst->tree_id = RoutingIDToAXTreeID(src.routing_id); 2527 dst->tree_id = RoutingIDToAXTreeID(src.routing_id);
2528 2528
2529 if (src.parent_routing_id != -1) 2529 if (src.parent_routing_id != -1)
2530 dst->parent_tree_id = RoutingIDToAXTreeID(src.parent_routing_id); 2530 dst->parent_tree_id = RoutingIDToAXTreeID(src.parent_routing_id);
2531 } 2531 }
2532 2532
2533 } // namespace content 2533 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698