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 2868 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2879 return; | 2879 return; |
2880 } | 2880 } |
2881 | 2881 |
2882 SetIsLoading(false, NULL); | 2882 SetIsLoading(false, NULL); |
2883 NotifyDisconnected(); | 2883 NotifyDisconnected(); |
2884 SetIsCrashed(status, error_code); | 2884 SetIsCrashed(status, error_code); |
2885 GetView()->OnTabCrashed(GetCrashedStatus(), crashed_error_code_); | 2885 GetView()->OnTabCrashed(GetCrashedStatus(), crashed_error_code_); |
2886 | 2886 |
2887 FOR_EACH_OBSERVER(WebContentsObserver, | 2887 FOR_EACH_OBSERVER(WebContentsObserver, |
2888 observers_, | 2888 observers_, |
2889 RenderViewGone(GetCrashedStatus())); | 2889 RenderProcessGone(GetCrashedStatus())); |
2890 } | 2890 } |
2891 | 2891 |
2892 void WebContentsImpl::RenderViewDeleted(RenderViewHost* rvh) { | 2892 void WebContentsImpl::RenderViewDeleted(RenderViewHost* rvh) { |
2893 render_manager_.RenderViewDeleted(rvh); | 2893 render_manager_.RenderViewDeleted(rvh); |
2894 FOR_EACH_OBSERVER(WebContentsObserver, observers_, RenderViewDeleted(rvh)); | 2894 FOR_EACH_OBSERVER(WebContentsObserver, observers_, RenderViewDeleted(rvh)); |
2895 } | 2895 } |
2896 | 2896 |
2897 void WebContentsImpl::DidNavigate( | 2897 void WebContentsImpl::DidNavigate( |
2898 RenderViewHost* rvh, | 2898 RenderViewHost* rvh, |
2899 const ViewHostMsg_FrameNavigate_Params& params) { | 2899 const ViewHostMsg_FrameNavigate_Params& params) { |
(...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3480 void WebContentsImpl::BeforeUnloadFiredFromRenderManager( | 3480 void WebContentsImpl::BeforeUnloadFiredFromRenderManager( |
3481 bool proceed, const base::TimeTicks& proceed_time, | 3481 bool proceed, const base::TimeTicks& proceed_time, |
3482 bool* proceed_to_fire_unload) { | 3482 bool* proceed_to_fire_unload) { |
3483 FOR_EACH_OBSERVER(WebContentsObserver, observers_, | 3483 FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
3484 BeforeUnloadFired(proceed_time)); | 3484 BeforeUnloadFired(proceed_time)); |
3485 if (delegate_) | 3485 if (delegate_) |
3486 delegate_->BeforeUnloadFired(this, proceed, proceed_to_fire_unload); | 3486 delegate_->BeforeUnloadFired(this, proceed, proceed_to_fire_unload); |
3487 // Note: |this| might be deleted at this point. | 3487 // Note: |this| might be deleted at this point. |
3488 } | 3488 } |
3489 | 3489 |
3490 void WebContentsImpl::RenderViewGoneFromRenderManager( | 3490 void WebContentsImpl::RenderProcessGoneFromRenderManager( |
3491 RenderViewHost* render_view_host) { | 3491 RenderViewHost* render_view_host) { |
3492 DCHECK(crashed_status_ != base::TERMINATION_STATUS_STILL_RUNNING); | 3492 DCHECK(crashed_status_ != base::TERMINATION_STATUS_STILL_RUNNING); |
3493 RenderViewTerminated(render_view_host, crashed_status_, crashed_error_code_); | 3493 RenderViewTerminated(render_view_host, crashed_status_, crashed_error_code_); |
3494 } | 3494 } |
3495 | 3495 |
3496 void WebContentsImpl::UpdateRenderViewSizeForRenderManager() { | 3496 void WebContentsImpl::UpdateRenderViewSizeForRenderManager() { |
3497 // TODO(brettw) this is a hack. See WebContentsView::SizeContents. | 3497 // TODO(brettw) this is a hack. See WebContentsView::SizeContents. |
3498 gfx::Size size = view_->GetContainerSize(); | 3498 gfx::Size size = view_->GetContainerSize(); |
3499 // 0x0 isn't a valid window size (minimal window size is 1x1) but it may be | 3499 // 0x0 isn't a valid window size (minimal window size is 1x1) but it may be |
3500 // here during container initialization and normal window size will be set | 3500 // here during container initialization and normal window size will be set |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3687 } | 3687 } |
3688 | 3688 |
3689 BrowserPluginGuestManager* | 3689 BrowserPluginGuestManager* |
3690 WebContentsImpl::GetBrowserPluginGuestManager() const { | 3690 WebContentsImpl::GetBrowserPluginGuestManager() const { |
3691 return static_cast<BrowserPluginGuestManager*>( | 3691 return static_cast<BrowserPluginGuestManager*>( |
3692 GetBrowserContext()->GetUserData( | 3692 GetBrowserContext()->GetUserData( |
3693 browser_plugin::kBrowserPluginGuestManagerKeyName)); | 3693 browser_plugin::kBrowserPluginGuestManagerKeyName)); |
3694 } | 3694 } |
3695 | 3695 |
3696 } // namespace content | 3696 } // namespace content |
OLD | NEW |