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

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

Issue 11820009: Distinguish plugin disconnections from plugin crashes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 11 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
« no previous file with comments | « chrome/browser/plugins/plugin_observer.cc ('k') | chrome/browser/ui/hung_plugin_tab_helper.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef CHROME_BROWSER_UI_HUNG_PLUGIN_TAB_HELPER_H_ 5 #ifndef CHROME_BROWSER_UI_HUNG_PLUGIN_TAB_HELPER_H_
6 #define CHROME_BROWSER_UI_HUNG_PLUGIN_TAB_HELPER_H_ 6 #define CHROME_BROWSER_UI_HUNG_PLUGIN_TAB_HELPER_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/file_path.h" 10 #include "base/file_path.h"
(...skipping 22 matching lines...) Expand all
33 // - Hide the infobar if the plugin starts responding again. 33 // - Hide the infobar if the plugin starts responding again.
34 // - Keep track of all of this for any number of plugins. 34 // - Keep track of all of this for any number of plugins.
35 class HungPluginTabHelper 35 class HungPluginTabHelper
36 : public content::WebContentsObserver, 36 : public content::WebContentsObserver,
37 public content::NotificationObserver, 37 public content::NotificationObserver,
38 public content::WebContentsUserData<HungPluginTabHelper> { 38 public content::WebContentsUserData<HungPluginTabHelper> {
39 public: 39 public:
40 virtual ~HungPluginTabHelper(); 40 virtual ~HungPluginTabHelper();
41 41
42 // content::WebContentsObserver overrides: 42 // content::WebContentsObserver overrides:
43 virtual void PluginCrashed(const FilePath& plugin_path) OVERRIDE; 43 virtual void PluginCrashed(const FilePath& plugin_path,
44 base::ProcessId plugin_pid) OVERRIDE;
44 virtual void PluginHungStatusChanged(int plugin_child_id, 45 virtual void PluginHungStatusChanged(int plugin_child_id,
45 const FilePath& plugin_path, 46 const FilePath& plugin_path,
46 bool is_hung) OVERRIDE; 47 bool is_hung) OVERRIDE;
47 48
48 // NotificationObserver overrides. 49 // NotificationObserver overrides.
49 virtual void Observe(int type, 50 virtual void Observe(int type,
50 const content::NotificationSource& source, 51 const content::NotificationSource& source,
51 const content::NotificationDetails& details) OVERRIDE; 52 const content::NotificationDetails& details) OVERRIDE;
52 53
53 // Called by an infobar when the user selects to kill the plugin. 54 // Called by an infobar when the user selects to kill the plugin.
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 100
100 content::NotificationRegistrar registrar_; 101 content::NotificationRegistrar registrar_;
101 102
102 // All currently hung plugins. 103 // All currently hung plugins.
103 PluginStateMap hung_plugins_; 104 PluginStateMap hung_plugins_;
104 105
105 DISALLOW_COPY_AND_ASSIGN(HungPluginTabHelper); 106 DISALLOW_COPY_AND_ASSIGN(HungPluginTabHelper);
106 }; 107 };
107 108
108 #endif // CHROME_BROWSER_UI_HUNG_PLUGIN_TAB_HELPER_H_ 109 #endif // CHROME_BROWSER_UI_HUNG_PLUGIN_TAB_HELPER_H_
OLDNEW
« no previous file with comments | « chrome/browser/plugins/plugin_observer.cc ('k') | chrome/browser/ui/hung_plugin_tab_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698