Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(103)

Side by Side Diff: chrome/browser/ui/hung_plugin_tab_helper.cc

Issue 10968043: Switch HungPluginTabHelper to use WebContentsUserData. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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;
40
39 namespace { 41 namespace {
40 42
41 // 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
42 // increased each time. 44 // increased each time.
43 const int kInitialReshowDelaySec = 10; 45 const int kInitialReshowDelaySec = 10;
44 46
45 #if defined(OS_WIN) 47 #if defined(OS_WIN)
46 48
47 const char kDumpChildProcessesSequenceName[] = "DumpChildProcesses"; 49 const char kDumpChildProcessesSequenceName[] = "DumpChildProcesses";
48 50
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 state->info_bar = NULL; 369 state->info_bar = NULL;
368 } 370 }
369 } 371 }
370 372
371 InfoBarTabHelper* HungPluginTabHelper::GetInfoBarHelper() { 373 InfoBarTabHelper* HungPluginTabHelper::GetInfoBarHelper() {
372 TabContents* tab_contents = TabContents::FromWebContents(web_contents()); 374 TabContents* tab_contents = TabContents::FromWebContents(web_contents());
373 if (!tab_contents) 375 if (!tab_contents)
374 return NULL; 376 return NULL;
375 return tab_contents->infobar_tab_helper(); 377 return tab_contents->infobar_tab_helper();
376 } 378 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/hung_plugin_tab_helper.h ('k') | chrome/browser/ui/tab_contents/tab_contents.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698