| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/webui/hung_renderer_dialog.h" | 5 #include "chrome/browser/ui/webui/hung_renderer_dialog.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 // HungRendererDialog::TabContentsObserverImpl | 75 // HungRendererDialog::TabContentsObserverImpl |
| 76 | 76 |
| 77 HungRendererDialog::TabContentsObserverImpl::TabContentsObserverImpl( | 77 HungRendererDialog::TabContentsObserverImpl::TabContentsObserverImpl( |
| 78 HungRendererDialog* dialog, | 78 HungRendererDialog* dialog, |
| 79 TabContents* contents) | 79 TabContents* contents) |
| 80 : TabContentsObserver(contents), | 80 : TabContentsObserver(contents), |
| 81 contents_(contents), | 81 contents_(contents), |
| 82 dialog_(dialog) { | 82 dialog_(dialog) { |
| 83 } | 83 } |
| 84 | 84 |
| 85 void HungRendererDialog::TabContentsObserverImpl::RenderViewGone() { | 85 void HungRendererDialog::TabContentsObserverImpl::RenderViewGone( |
| 86 base::TerminationStatus status) { |
| 86 dialog_->HideDialog(contents_); | 87 dialog_->HideDialog(contents_); |
| 87 } | 88 } |
| 88 | 89 |
| 89 void HungRendererDialog::TabContentsObserverImpl::TabContentsDestroyed( | 90 void HungRendererDialog::TabContentsObserverImpl::TabContentsDestroyed( |
| 90 TabContents* tab) { | 91 TabContents* tab) { |
| 91 dialog_->HideDialog(contents_); | 92 dialog_->HideDialog(contents_); |
| 92 } | 93 } |
| 93 | 94 |
| 94 //////////////////////////////////////////////////////////////////////////////// | 95 //////////////////////////////////////////////////////////////////////////////// |
| 95 // HungRendererDialog private methods | 96 // HungRendererDialog private methods |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 DictionaryValue* dict = new DictionaryValue(); | 233 DictionaryValue* dict = new DictionaryValue(); |
| 233 dict->SetString("url", it->tab_contents()->GetURL().spec()); | 234 dict->SetString("url", it->tab_contents()->GetURL().spec()); |
| 234 dict->SetString("title", title); | 235 dict->SetString("title", title); |
| 235 tab_contents_list.Append(dict); | 236 tab_contents_list.Append(dict); |
| 236 } | 237 } |
| 237 } | 238 } |
| 238 // Send list of tab contents details to javascript. | 239 // Send list of tab contents details to javascript. |
| 239 web_ui_->CallJavascriptFunction("hungRendererDialog.setTabContentsList", | 240 web_ui_->CallJavascriptFunction("hungRendererDialog.setTabContentsList", |
| 240 tab_contents_list); | 241 tab_contents_list); |
| 241 } | 242 } |
| OLD | NEW |