Chromium Code Reviews| 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 2853 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2864 // Restore the focus to the tab (otherwise the focus will be on the top | 2864 // Restore the focus to the tab (otherwise the focus will be on the top |
| 2865 // window). | 2865 // window). |
| 2866 if (was_crashed && !FocusLocationBarByDefault() && | 2866 if (was_crashed && !FocusLocationBarByDefault() && |
| 2867 (!delegate_ || delegate_->ShouldFocusPageAfterCrash())) { | 2867 (!delegate_ || delegate_->ShouldFocusPageAfterCrash())) { |
| 2868 view_->Focus(); | 2868 view_->Focus(); |
| 2869 } | 2869 } |
| 2870 | 2870 |
| 2871 FOR_EACH_OBSERVER(WebContentsObserver, observers_, RenderViewReady()); | 2871 FOR_EACH_OBSERVER(WebContentsObserver, observers_, RenderViewReady()); |
| 2872 } | 2872 } |
| 2873 | 2873 |
| 2874 void WebContentsImpl::RenderViewTerminated(RenderViewHost* rvh, | 2874 void WebContentsImpl::RenderViewTerminated(RenderViewHost* rvh, |
|
Charlie Reis
2013/07/09 16:57:37
I'm debating whether we should change this to Rend
nasko
2013/07/09 19:12:48
This is called for each RenderViewHost, so let's k
| |
| 2875 base::TerminationStatus status, | 2875 base::TerminationStatus status, |
| 2876 int error_code) { | 2876 int error_code) { |
| 2877 if (rvh != GetRenderViewHost()) { | 2877 if (rvh != GetRenderViewHost()) { |
| 2878 // The pending page's RenderViewHost is gone. | 2878 // The pending page's RenderViewHost is gone. |
| 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 787 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 |