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

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: Rename test function. 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 #include "net/http/http_transaction_factory.h" 88 #include "net/http/http_transaction_factory.h"
89 #include "net/url_request/url_request_context.h" 89 #include "net/url_request/url_request_context.h"
90 #include "net/url_request/url_request_context_getter.h" 90 #include "net/url_request/url_request_context_getter.h"
91 #include "ui/base/layout.h" 91 #include "ui/base/layout.h"
92 #include "ui/gfx/display.h" 92 #include "ui/gfx/display.h"
93 #include "ui/gfx/screen.h" 93 #include "ui/gfx/screen.h"
94 #include "ui/gl/gl_switches.h" 94 #include "ui/gl/gl_switches.h"
95 #include "webkit/common/webpreferences.h" 95 #include "webkit/common/webpreferences.h"
96 96
97 #if defined(OS_ANDROID) 97 #if defined(OS_ANDROID)
98 #include "content/browser/android/content_view_core_impl.h"
98 #include "content/browser/android/date_time_chooser_android.h" 99 #include "content/browser/android/date_time_chooser_android.h"
99 #include "content/browser/media/android/browser_media_player_manager.h" 100 #include "content/browser/media/android/browser_media_player_manager.h"
100 #include "content/browser/web_contents/web_contents_android.h" 101 #include "content/browser/web_contents/web_contents_android.h"
101 #include "content/public/browser/android/content_view_core.h" 102 #include "content/public/browser/android/content_view_core.h"
102 #endif 103 #endif
103 104
104 #if defined(OS_MACOSX) 105 #if defined(OS_MACOSX)
105 #include "base/mac/foundation_util.h" 106 #include "base/mac/foundation_util.h"
106 #include "ui/gl/io_surface_support_mac.h" 107 #include "ui/gl/io_surface_support_mac.h"
107 #endif 108 #endif
(...skipping 3362 matching lines...) Expand 10 before | Expand all | Expand 10 after
3470 // Ignore this if it comes from a RenderViewHost that we aren't showing. 3471 // Ignore this if it comes from a RenderViewHost that we aren't showing.
3471 if (delegate_ && rvh == GetRenderViewHost()) 3472 if (delegate_ && rvh == GetRenderViewHost())
3472 delegate_->CloseContents(this); 3473 delegate_->CloseContents(this);
3473 } 3474 }
3474 3475
3475 void WebContentsImpl::SwappedOut(RenderFrameHost* rfh) { 3476 void WebContentsImpl::SwappedOut(RenderFrameHost* rfh) {
3476 if (delegate_ && rfh->GetRenderViewHost() == GetRenderViewHost()) 3477 if (delegate_ && rfh->GetRenderViewHost() == GetRenderViewHost())
3477 delegate_->SwappedOut(this); 3478 delegate_->SwappedOut(this);
3478 } 3479 }
3479 3480
3481 void WebContentsImpl::DidDeferAfterResponseStarted() {
3482 #if defined(OS_ANDROID)
3483 ContentViewCoreImpl::FromWebContents(this)->DidDeferAfterResponseStarted();
3484 #endif
3485 }
3486
3487 bool WebContentsImpl::WillHandleDeferAfterResponseStarted() {
3488 #if defined(OS_ANDROID)
3489 return ContentViewCoreImpl::FromWebContents(this)->
3490 WillHandleDeferAfterResponseStarted();
3491 #else
3492 return false;
3493 #endif
3494 }
3495
3480 void WebContentsImpl::RequestMove(const gfx::Rect& new_bounds) { 3496 void WebContentsImpl::RequestMove(const gfx::Rect& new_bounds) {
3481 if (delegate_ && delegate_->IsPopupOrPanel(this)) 3497 if (delegate_ && delegate_->IsPopupOrPanel(this))
3482 delegate_->MoveContents(this, new_bounds); 3498 delegate_->MoveContents(this, new_bounds);
3483 } 3499 }
3484 3500
3485 void WebContentsImpl::DidStartLoading(RenderFrameHost* render_frame_host, 3501 void WebContentsImpl::DidStartLoading(RenderFrameHost* render_frame_host,
3486 bool to_different_document) { 3502 bool to_different_document) {
3487 SetIsLoading(render_frame_host->GetRenderViewHost(), true, 3503 SetIsLoading(render_frame_host->GetRenderViewHost(), true,
3488 to_different_document, NULL); 3504 to_different_document, NULL);
3489 } 3505 }
(...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after
4074 } 4090 }
4075 4091
4076 void WebContentsImpl::OnPreferredSizeChanged(const gfx::Size& old_size) { 4092 void WebContentsImpl::OnPreferredSizeChanged(const gfx::Size& old_size) {
4077 if (!delegate_) 4093 if (!delegate_)
4078 return; 4094 return;
4079 const gfx::Size new_size = GetPreferredSize(); 4095 const gfx::Size new_size = GetPreferredSize();
4080 if (new_size != old_size) 4096 if (new_size != old_size)
4081 delegate_->UpdatePreferredSize(this, new_size); 4097 delegate_->UpdatePreferredSize(this, new_size);
4082 } 4098 }
4083 4099
4100 void WebContentsImpl::ResumeResponseDeferredAtStart() {
4101 FrameTreeNode* node = frame_tree_.root();
4102 node->render_manager()->ResumeResponseDeferredAtStart();
4103 }
4104
4084 } // namespace content 4105 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698