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

Side by Side Diff: content/browser/web_contents/web_contents_impl.cc

Issue 297973002: Navigation transitions: Block first response until after transitions have run. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changes from review. Created 6 years, 6 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 (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/browser/web_contents/web_contents_impl.h" 5 #include "content/browser/web_contents/web_contents_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 3459 matching lines...) Expand 10 before | Expand all | Expand 10 after
3470 // Ignore this if it comes from a RenderViewHost that we aren't showing. 3470 // Ignore this if it comes from a RenderViewHost that we aren't showing.
3471 if (delegate_ && rvh == GetRenderViewHost()) 3471 if (delegate_ && rvh == GetRenderViewHost())
3472 delegate_->CloseContents(this); 3472 delegate_->CloseContents(this);
3473 } 3473 }
3474 3474
3475 void WebContentsImpl::SwappedOut(RenderFrameHost* rfh) { 3475 void WebContentsImpl::SwappedOut(RenderFrameHost* rfh) {
3476 if (delegate_ && rfh->GetRenderViewHost() == GetRenderViewHost()) 3476 if (delegate_ && rfh->GetRenderViewHost() == GetRenderViewHost())
3477 delegate_->SwappedOut(this); 3477 delegate_->SwappedOut(this);
3478 } 3478 }
3479 3479
3480 void WebContentsImpl::DidDeferAfterResponseStarted() {
3481 FOR_EACH_OBSERVER(
3482 WebContentsObserver, observers_, DidDeferAfterResponseStarted());
3483 }
3484
3480 void WebContentsImpl::RequestMove(const gfx::Rect& new_bounds) { 3485 void WebContentsImpl::RequestMove(const gfx::Rect& new_bounds) {
3481 if (delegate_ && delegate_->IsPopupOrPanel(this)) 3486 if (delegate_ && delegate_->IsPopupOrPanel(this))
3482 delegate_->MoveContents(this, new_bounds); 3487 delegate_->MoveContents(this, new_bounds);
3483 } 3488 }
3484 3489
3485 void WebContentsImpl::DidStartLoading(RenderFrameHost* render_frame_host, 3490 void WebContentsImpl::DidStartLoading(RenderFrameHost* render_frame_host,
3486 bool to_different_document) { 3491 bool to_different_document) {
3487 SetIsLoading(render_frame_host->GetRenderViewHost(), true, 3492 SetIsLoading(render_frame_host->GetRenderViewHost(), true,
3488 to_different_document, NULL); 3493 to_different_document, NULL);
3489 } 3494 }
(...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after
4074 } 4079 }
4075 4080
4076 void WebContentsImpl::OnPreferredSizeChanged(const gfx::Size& old_size) { 4081 void WebContentsImpl::OnPreferredSizeChanged(const gfx::Size& old_size) {
4077 if (!delegate_) 4082 if (!delegate_)
4078 return; 4083 return;
4079 const gfx::Size new_size = GetPreferredSize(); 4084 const gfx::Size new_size = GetPreferredSize();
4080 if (new_size != old_size) 4085 if (new_size != old_size)
4081 delegate_->UpdatePreferredSize(this, new_size); 4086 delegate_->UpdatePreferredSize(this, new_size);
4082 } 4087 }
4083 4088
4089 void WebContentsImpl::SetHasPendingTransitionRequest(
4090 bool has_pending_transition) {
4091 FrameTreeNode* node = frame_tree_.root();
4092 node->render_manager()->SetHasPendingTransitionRequest(
4093 has_pending_transition);
4094 }
4095
4096 void WebContentsImpl::ResumeResponseDeferredAtStart() {
4097 FrameTreeNode* node = frame_tree_.root();
4098 node->render_manager()->ResumeResponseDeferredAtStart();
4099 }
4100
4084 } // namespace content 4101 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698