| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <cmath> | 9 #include <cmath> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 1145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1156 | 1156 |
| 1157 crashed_status_ = status; | 1157 crashed_status_ = status; |
| 1158 crashed_error_code_ = error_code; | 1158 crashed_error_code_ = error_code; |
| 1159 NotifyNavigationStateChanged(INVALIDATE_TYPE_TAB); | 1159 NotifyNavigationStateChanged(INVALIDATE_TYPE_TAB); |
| 1160 } | 1160 } |
| 1161 | 1161 |
| 1162 base::TerminationStatus WebContentsImpl::GetCrashedStatus() const { | 1162 base::TerminationStatus WebContentsImpl::GetCrashedStatus() const { |
| 1163 return crashed_status_; | 1163 return crashed_status_; |
| 1164 } | 1164 } |
| 1165 | 1165 |
| 1166 int WebContentsImpl::GetCrashedErrorCode() const { |
| 1167 return crashed_error_code_; |
| 1168 } |
| 1169 |
| 1166 bool WebContentsImpl::IsBeingDestroyed() const { | 1170 bool WebContentsImpl::IsBeingDestroyed() const { |
| 1167 return is_being_destroyed_; | 1171 return is_being_destroyed_; |
| 1168 } | 1172 } |
| 1169 | 1173 |
| 1170 void WebContentsImpl::NotifyNavigationStateChanged( | 1174 void WebContentsImpl::NotifyNavigationStateChanged( |
| 1171 InvalidateTypes changed_flags) { | 1175 InvalidateTypes changed_flags) { |
| 1172 // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/466285 | 1176 // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/466285 |
| 1173 // is fixed. | 1177 // is fixed. |
| 1174 tracked_objects::ScopedTracker tracking_profile( | 1178 tracked_objects::ScopedTracker tracking_profile( |
| 1175 FROM_HERE_WITH_EXPLICIT_FUNCTION( | 1179 FROM_HERE_WITH_EXPLICIT_FUNCTION( |
| (...skipping 3226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4402 rdh->OnUserGesture(this); | 4406 rdh->OnUserGesture(this); |
| 4403 } | 4407 } |
| 4404 | 4408 |
| 4405 void WebContentsImpl::OnIgnoredUIEvent() { | 4409 void WebContentsImpl::OnIgnoredUIEvent() { |
| 4406 // Notify observers. | 4410 // Notify observers. |
| 4407 FOR_EACH_OBSERVER(WebContentsObserver, observers_, DidGetIgnoredUIEvent()); | 4411 FOR_EACH_OBSERVER(WebContentsObserver, observers_, DidGetIgnoredUIEvent()); |
| 4408 } | 4412 } |
| 4409 | 4413 |
| 4410 void WebContentsImpl::RendererUnresponsive( | 4414 void WebContentsImpl::RendererUnresponsive( |
| 4411 RenderWidgetHostImpl* render_widget_host) { | 4415 RenderWidgetHostImpl* render_widget_host) { |
| 4416 FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
| 4417 OnRendererUnresponsive(render_widget_host)); |
| 4418 |
| 4412 // Don't show hung renderer dialog for a swapped out RVH. | 4419 // Don't show hung renderer dialog for a swapped out RVH. |
| 4413 if (render_widget_host != GetRenderViewHost()->GetWidget()) | 4420 if (render_widget_host != GetRenderViewHost()->GetWidget()) |
| 4414 return; | 4421 return; |
| 4415 | 4422 |
| 4416 RenderFrameHostImpl* rfhi = | 4423 RenderFrameHostImpl* rfhi = |
| 4417 static_cast<RenderFrameHostImpl*>(GetRenderViewHost()->GetMainFrame()); | 4424 static_cast<RenderFrameHostImpl*>(GetRenderViewHost()->GetMainFrame()); |
| 4418 | 4425 |
| 4419 // Ignore renderer unresponsive event if debugger is attached to the tab | 4426 // Ignore renderer unresponsive event if debugger is attached to the tab |
| 4420 // since the event may be a result of the renderer sitting on a breakpoint. | 4427 // since the event may be a result of the renderer sitting on a breakpoint. |
| 4421 // See http://crbug.com/65458 | 4428 // See http://crbug.com/65458 |
| (...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4854 else | 4861 else |
| 4855 WasHidden(); | 4862 WasHidden(); |
| 4856 } | 4863 } |
| 4857 | 4864 |
| 4858 void WebContentsImpl::SetJavaScriptDialogManagerForTesting( | 4865 void WebContentsImpl::SetJavaScriptDialogManagerForTesting( |
| 4859 JavaScriptDialogManager* dialog_manager) { | 4866 JavaScriptDialogManager* dialog_manager) { |
| 4860 dialog_manager_ = dialog_manager; | 4867 dialog_manager_ = dialog_manager; |
| 4861 } | 4868 } |
| 4862 | 4869 |
| 4863 } // namespace content | 4870 } // namespace content |
| OLD | NEW |