| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "chrome/browser/ui/views/session_crashed_bubble_view.h" | 5 #include "chrome/browser/ui/views/session_crashed_bubble_view.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 339 false)); | 339 false)); |
| 340 } | 340 } |
| 341 | 341 |
| 342 void SessionCrashedBubbleView::DidStartNavigationToPendingEntry( | 342 void SessionCrashedBubbleView::DidStartNavigationToPendingEntry( |
| 343 const GURL& url, | 343 const GURL& url, |
| 344 content::NavigationController::ReloadType reload_type) { | 344 content::NavigationController::ReloadType reload_type) { |
| 345 started_navigation_ = true; | 345 started_navigation_ = true; |
| 346 } | 346 } |
| 347 | 347 |
| 348 void SessionCrashedBubbleView::DidFinishLoad( | 348 void SessionCrashedBubbleView::DidFinishLoad( |
| 349 int64 frame_id, | 349 content::RenderFrameHost* render_frame_host, |
| 350 const GURL& validated_url, | 350 const GURL& validated_url) { |
| 351 bool is_main_frame, | |
| 352 content::RenderViewHost* render_view_host) { | |
| 353 if (started_navigation_) | 351 if (started_navigation_) |
| 354 CloseBubble(); | 352 CloseBubble(); |
| 355 } | 353 } |
| 356 | 354 |
| 357 void SessionCrashedBubbleView::WasShown() { | 355 void SessionCrashedBubbleView::WasShown() { |
| 358 GetWidget()->Show(); | 356 GetWidget()->Show(); |
| 359 } | 357 } |
| 360 | 358 |
| 361 void SessionCrashedBubbleView::WasHidden() { | 359 void SessionCrashedBubbleView::WasHidden() { |
| 362 GetWidget()->Hide(); | 360 GetWidget()->Hide(); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 395 GetWidget()->Close(); | 393 GetWidget()->Close(); |
| 396 } | 394 } |
| 397 | 395 |
| 398 bool ShowSessionCrashedBubble(Browser* browser) { | 396 bool ShowSessionCrashedBubble(Browser* browser) { |
| 399 if (IsBubbleUIEnabled()) { | 397 if (IsBubbleUIEnabled()) { |
| 400 SessionCrashedBubbleView::Show(browser); | 398 SessionCrashedBubbleView::Show(browser); |
| 401 return true; | 399 return true; |
| 402 } | 400 } |
| 403 return false; | 401 return false; |
| 404 } | 402 } |
| OLD | NEW |