| 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 1139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1150 | 1150 |
| 1151 crashed_status_ = status; | 1151 crashed_status_ = status; |
| 1152 crashed_error_code_ = error_code; | 1152 crashed_error_code_ = error_code; |
| 1153 NotifyNavigationStateChanged(INVALIDATE_TYPE_TAB); | 1153 NotifyNavigationStateChanged(INVALIDATE_TYPE_TAB); |
| 1154 } | 1154 } |
| 1155 | 1155 |
| 1156 base::TerminationStatus WebContentsImpl::GetCrashedStatus() const { | 1156 base::TerminationStatus WebContentsImpl::GetCrashedStatus() const { |
| 1157 return crashed_status_; | 1157 return crashed_status_; |
| 1158 } | 1158 } |
| 1159 | 1159 |
| 1160 int WebContentsImpl::GetCrashedErrorCode() const { |
| 1161 return crashed_error_code_; |
| 1162 } |
| 1163 |
| 1160 bool WebContentsImpl::IsBeingDestroyed() const { | 1164 bool WebContentsImpl::IsBeingDestroyed() const { |
| 1161 return is_being_destroyed_; | 1165 return is_being_destroyed_; |
| 1162 } | 1166 } |
| 1163 | 1167 |
| 1164 void WebContentsImpl::NotifyNavigationStateChanged( | 1168 void WebContentsImpl::NotifyNavigationStateChanged( |
| 1165 InvalidateTypes changed_flags) { | 1169 InvalidateTypes changed_flags) { |
| 1166 // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/466285 | 1170 // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/466285 |
| 1167 // is fixed. | 1171 // is fixed. |
| 1168 tracked_objects::ScopedTracker tracking_profile( | 1172 tracked_objects::ScopedTracker tracking_profile( |
| 1169 FROM_HERE_WITH_EXPLICIT_FUNCTION( | 1173 FROM_HERE_WITH_EXPLICIT_FUNCTION( |
| (...skipping 3200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4370 rdh->OnUserGesture(this); | 4374 rdh->OnUserGesture(this); |
| 4371 } | 4375 } |
| 4372 | 4376 |
| 4373 void WebContentsImpl::OnIgnoredUIEvent() { | 4377 void WebContentsImpl::OnIgnoredUIEvent() { |
| 4374 // Notify observers. | 4378 // Notify observers. |
| 4375 FOR_EACH_OBSERVER(WebContentsObserver, observers_, DidGetIgnoredUIEvent()); | 4379 FOR_EACH_OBSERVER(WebContentsObserver, observers_, DidGetIgnoredUIEvent()); |
| 4376 } | 4380 } |
| 4377 | 4381 |
| 4378 void WebContentsImpl::RendererUnresponsive( | 4382 void WebContentsImpl::RendererUnresponsive( |
| 4379 RenderWidgetHostImpl* render_widget_host) { | 4383 RenderWidgetHostImpl* render_widget_host) { |
| 4384 FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
| 4385 OnRendererUnresponsive(render_widget_host)); |
| 4386 |
| 4380 // Don't show hung renderer dialog for a swapped out RVH. | 4387 // Don't show hung renderer dialog for a swapped out RVH. |
| 4381 if (render_widget_host != GetRenderViewHost()->GetWidget()) | 4388 if (render_widget_host != GetRenderViewHost()->GetWidget()) |
| 4382 return; | 4389 return; |
| 4383 | 4390 |
| 4384 RenderFrameHostImpl* rfhi = | 4391 RenderFrameHostImpl* rfhi = |
| 4385 static_cast<RenderFrameHostImpl*>(GetRenderViewHost()->GetMainFrame()); | 4392 static_cast<RenderFrameHostImpl*>(GetRenderViewHost()->GetMainFrame()); |
| 4386 | 4393 |
| 4387 // Ignore renderer unresponsive event if debugger is attached to the tab | 4394 // Ignore renderer unresponsive event if debugger is attached to the tab |
| 4388 // since the event may be a result of the renderer sitting on a breakpoint. | 4395 // since the event may be a result of the renderer sitting on a breakpoint. |
| 4389 // See http://crbug.com/65458 | 4396 // See http://crbug.com/65458 |
| (...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4822 else | 4829 else |
| 4823 WasHidden(); | 4830 WasHidden(); |
| 4824 } | 4831 } |
| 4825 | 4832 |
| 4826 void WebContentsImpl::SetJavaScriptDialogManagerForTesting( | 4833 void WebContentsImpl::SetJavaScriptDialogManagerForTesting( |
| 4827 JavaScriptDialogManager* dialog_manager) { | 4834 JavaScriptDialogManager* dialog_manager) { |
| 4828 dialog_manager_ = dialog_manager; | 4835 dialog_manager_ = dialog_manager; |
| 4829 } | 4836 } |
| 4830 | 4837 |
| 4831 } // namespace content | 4838 } // namespace content |
| OLD | NEW |