| 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 "chrome/browser/ui/hung_plugin_tab_helper.h" | 5 #include "chrome/browser/ui/hung_plugin_tab_helper.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/process.h" | 9 #include "base/process.h" |
| 10 #include "base/process_util.h" | 10 #include "base/process_util.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 #include "grit/locale_settings.h" | 29 #include "grit/locale_settings.h" |
| 30 #include "grit/theme_resources.h" | 30 #include "grit/theme_resources.h" |
| 31 #include "ui/base/l10n/l10n_util.h" | 31 #include "ui/base/l10n/l10n_util.h" |
| 32 #include "ui/base/resource/resource_bundle.h" | 32 #include "ui/base/resource/resource_bundle.h" |
| 33 | 33 |
| 34 #if defined(OS_WIN) | 34 #if defined(OS_WIN) |
| 35 #include "base/win/scoped_handle.h" | 35 #include "base/win/scoped_handle.h" |
| 36 #include "chrome/browser/hang_monitor/hang_crash_dump_win.h" | 36 #include "chrome/browser/hang_monitor/hang_crash_dump_win.h" |
| 37 #endif | 37 #endif |
| 38 | 38 |
| 39 int HungPluginTabHelper::kUserDataKey; | 39 DEFINE_WEB_CONTENTS_USER_DATA_KEY(HungPluginTabHelper) |
| 40 | 40 |
| 41 namespace { | 41 namespace { |
| 42 | 42 |
| 43 // Delay in seconds before re-showing the hung plugin message. This will be | 43 // Delay in seconds before re-showing the hung plugin message. This will be |
| 44 // increased each time. | 44 // increased each time. |
| 45 const int kInitialReshowDelaySec = 10; | 45 const int kInitialReshowDelaySec = 10; |
| 46 | 46 |
| 47 #if defined(OS_WIN) | 47 #if defined(OS_WIN) |
| 48 | 48 |
| 49 const char kDumpChildProcessesSequenceName[] = "DumpChildProcesses"; | 49 const char kDumpChildProcessesSequenceName[] = "DumpChildProcesses"; |
| (...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 376 state->info_bar = NULL; | 376 state->info_bar = NULL; |
| 377 } | 377 } |
| 378 } | 378 } |
| 379 | 379 |
| 380 InfoBarTabHelper* HungPluginTabHelper::GetInfoBarHelper() { | 380 InfoBarTabHelper* HungPluginTabHelper::GetInfoBarHelper() { |
| 381 TabContents* tab_contents = TabContents::FromWebContents(web_contents()); | 381 TabContents* tab_contents = TabContents::FromWebContents(web_contents()); |
| 382 if (!tab_contents) | 382 if (!tab_contents) |
| 383 return NULL; | 383 return NULL; |
| 384 return tab_contents->infobar_tab_helper(); | 384 return tab_contents->infobar_tab_helper(); |
| 385 } | 385 } |
| OLD | NEW |