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

Side by Side Diff: chrome/browser/hang_monitor/hung_plugin_action.h

Issue 1109043003: Apply automated fixits for Chrome clang plugin to chrome. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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
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_HANG_MONITOR_HUNG_PLUGIN_ACTION_H__ 5 #ifndef CHROME_BROWSER_HANG_MONITOR_HUNG_PLUGIN_ACTION_H__
6 #define CHROME_BROWSER_HANG_MONITOR_HUNG_PLUGIN_ACTION_H__ 6 #define CHROME_BROWSER_HANG_MONITOR_HUNG_PLUGIN_ACTION_H__
7 7
8 #include "base/strings/string16.h" 8 #include "base/strings/string16.h"
9 #include "chrome/browser/hang_monitor/hung_window_detector.h" 9 #include "chrome/browser/hang_monitor/hung_window_detector.h"
10 10
11 // This class provides an implementation the 11 // This class provides an implementation the
12 // HungWindowDetector::HungWindowNotification callback interface. 12 // HungWindowDetector::HungWindowNotification callback interface.
13 // It checks to see if the hung window belongs to a process different 13 // It checks to see if the hung window belongs to a process different
14 // from that of the browser process and, if so, it returns an action 14 // from that of the browser process and, if so, it returns an action
15 // of HungWindowNotification::HUNG_WINDOW_TERMINATE_PROCESS. 15 // of HungWindowNotification::HUNG_WINDOW_TERMINATE_PROCESS.
16 // Note: We can write other action classes that implement the same 16 // Note: We can write other action classes that implement the same
17 // interface and switch the action done on hung plugins based on user 17 // interface and switch the action done on hung plugins based on user
18 // preferences. 18 // preferences.
19 class HungPluginAction : public HungWindowDetector::HungWindowNotification { 19 class HungPluginAction : public HungWindowDetector::HungWindowNotification {
20 public: 20 public:
21 HungPluginAction(); 21 HungPluginAction();
22 ~HungPluginAction(); 22 ~HungPluginAction();
23 // HungWindowNotification implementation 23 // HungWindowNotification implementation
24 virtual bool OnHungWindowDetected(HWND hung_window, 24 bool OnHungWindowDetected(HWND hung_window,
25 HWND top_level_window, 25 HWND top_level_window,
26 ActionOnHungWindow* action); 26 ActionOnHungWindow* action) override;
27 27
28 protected: 28 protected:
29 void OnWindowResponsive(HWND window); 29 void OnWindowResponsive(HWND window);
30 30
31 // The callback function for the SendMessageCallback API 31 // The callback function for the SendMessageCallback API
32 static void CALLBACK HungWindowResponseCallback(HWND target_window, 32 static void CALLBACK HungWindowResponseCallback(HWND target_window,
33 UINT message, 33 UINT message,
34 ULONG_PTR data, 34 ULONG_PTR data,
35 LRESULT result); 35 LRESULT result);
36 36
37 static BOOL CALLBACK DismissMessageBox(HWND window, LPARAM ignore); 37 static BOOL CALLBACK DismissMessageBox(HWND window, LPARAM ignore);
38 38
39 protected: 39 protected:
40 bool GetPluginNameAndVersion(HWND plugin_window, 40 bool GetPluginNameAndVersion(HWND plugin_window,
41 DWORD browser_process_id, 41 DWORD browser_process_id,
42 base::string16* plugin_name, 42 base::string16* plugin_name,
43 base::string16* plugin_version); 43 base::string16* plugin_version);
44 // The currently hung plugin window that we are prompting the user about 44 // The currently hung plugin window that we are prompting the user about
45 HWND current_hung_plugin_window_; 45 HWND current_hung_plugin_window_;
46 }; 46 };
47 47
48 #endif // CHROME_BROWSER_HANG_MONITOR_HUNG_PLUGIN_ACTION_H__ 48 #endif // CHROME_BROWSER_HANG_MONITOR_HUNG_PLUGIN_ACTION_H__
OLDNEW
« no previous file with comments | « chrome/browser/google/google_update_win.cc ('k') | chrome/browser/hang_monitor/hung_window_detector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698