| OLD | NEW |
| 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 3347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3358 opener_ = NULL; | 3358 opener_ = NULL; |
| 3359 } | 3359 } |
| 3360 | 3360 |
| 3361 // Notify all swapped out RenderViewHosts for this tab. This is important | 3361 // Notify all swapped out RenderViewHosts for this tab. This is important |
| 3362 // in case we go back to them, or if another window in those processes tries | 3362 // in case we go back to them, or if another window in those processes tries |
| 3363 // to access window.opener. | 3363 // to access window.opener. |
| 3364 GetRenderManager()->DidDisownOpener(rvh); | 3364 GetRenderManager()->DidDisownOpener(rvh); |
| 3365 } | 3365 } |
| 3366 | 3366 |
| 3367 void WebContentsImpl::DidAccessInitialDocument() { | 3367 void WebContentsImpl::DidAccessInitialDocument() { |
| 3368 // We may have left a failed browser-initiated navigation in the address bar |
| 3369 // to let the user edit it and try again. Clear it now that content might |
| 3370 // show up underneath it. |
| 3371 if (!IsLoading() && controller_.GetPendingEntry()) |
| 3372 controller_.DiscardPendingEntry(); |
| 3373 |
| 3368 // Update the URL display. | 3374 // Update the URL display. |
| 3369 NotifyNavigationStateChanged(content::INVALIDATE_TYPE_URL); | 3375 NotifyNavigationStateChanged(content::INVALIDATE_TYPE_URL); |
| 3370 } | 3376 } |
| 3371 | 3377 |
| 3372 void WebContentsImpl::DocumentAvailableInMainFrame( | 3378 void WebContentsImpl::DocumentAvailableInMainFrame( |
| 3373 RenderViewHost* render_view_host) { | 3379 RenderViewHost* render_view_host) { |
| 3374 FOR_EACH_OBSERVER(WebContentsObserver, observers_, | 3380 FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
| 3375 DocumentAvailableInMainFrame()); | 3381 DocumentAvailableInMainFrame()); |
| 3376 } | 3382 } |
| 3377 | 3383 |
| (...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3837 | 3843 |
| 3838 void WebContentsImpl::OnPreferredSizeChanged(const gfx::Size& old_size) { | 3844 void WebContentsImpl::OnPreferredSizeChanged(const gfx::Size& old_size) { |
| 3839 if (!delegate_) | 3845 if (!delegate_) |
| 3840 return; | 3846 return; |
| 3841 const gfx::Size new_size = GetPreferredSize(); | 3847 const gfx::Size new_size = GetPreferredSize(); |
| 3842 if (new_size != old_size) | 3848 if (new_size != old_size) |
| 3843 delegate_->UpdatePreferredSize(this, new_size); | 3849 delegate_->UpdatePreferredSize(this, new_size); |
| 3844 } | 3850 } |
| 3845 | 3851 |
| 3846 } // namespace content | 3852 } // namespace content |
| OLD | NEW |