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

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

Issue 10689095: browser: Put simple_message_box.h and chrome_web_contents_view_delegate.h into chrome namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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 <windows.h> 5 #include <windows.h>
6 6
7 #include "chrome/browser/hang_monitor/hung_plugin_action.h" 7 #include "chrome/browser/hang_monitor/hung_plugin_action.h"
8 8
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/version.h" 10 #include "base/version.h"
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 // Before displaying the message box, invoke SendMessageCallback on the 106 // Before displaying the message box, invoke SendMessageCallback on the
107 // hung window. If the callback ever hits, the window is not hung anymore 107 // hung window. If the callback ever hits, the window is not hung anymore
108 // and we can dismiss the message box. 108 // and we can dismiss the message box.
109 SendMessageCallback(hung_window, 109 SendMessageCallback(hung_window,
110 WM_NULL, 110 WM_NULL,
111 0, 111 0,
112 0, 112 0,
113 HungWindowResponseCallback, 113 HungWindowResponseCallback,
114 reinterpret_cast<ULONG_PTR>(this)); 114 reinterpret_cast<ULONG_PTR>(this));
115 current_hung_plugin_window_ = hung_window; 115 current_hung_plugin_window_ = hung_window;
116 if (browser::ShowMessageBox(NULL, title, message, 116 if (chrome::ShowMessageBox(NULL, title, message,
117 browser::MESSAGE_BOX_TYPE_QUESTION) == 117 chrome::MESSAGE_BOX_TYPE_QUESTION) ==
118 browser::MESSAGE_BOX_RESULT_YES) { 118 chrome::MESSAGE_BOX_RESULT_YES) {
119 *action = HungWindowNotification::HUNG_WINDOW_TERMINATE_PROCESS; 119 *action = HungWindowNotification::HUNG_WINDOW_TERMINATE_PROCESS;
120 } else { 120 } else {
121 // If the user choses to ignore the hung window warning, the 121 // If the user choses to ignore the hung window warning, the
122 // message timeout for this window should be doubled. We only 122 // message timeout for this window should be doubled. We only
123 // double the timeout property on the window if the property 123 // double the timeout property on the window if the property
124 // exists. The property is deleted if the window becomes 124 // exists. The property is deleted if the window becomes
125 // responsive. 125 // responsive.
126 continue_hang_detection = false; 126 continue_hang_detection = false;
127 #pragma warning(disable:4311) 127 #pragma warning(disable:4311)
128 int child_window_message_timeout = 128 int child_window_message_timeout =
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 void CALLBACK HungPluginAction::HungWindowResponseCallback(HWND target_window, 202 void CALLBACK HungPluginAction::HungWindowResponseCallback(HWND target_window,
203 UINT message, 203 UINT message,
204 ULONG_PTR data, 204 ULONG_PTR data,
205 LRESULT result) { 205 LRESULT result) {
206 HungPluginAction* instance = reinterpret_cast<HungPluginAction*>(data); 206 HungPluginAction* instance = reinterpret_cast<HungPluginAction*>(data);
207 DCHECK(NULL != instance); 207 DCHECK(NULL != instance);
208 if (NULL != instance) { 208 if (NULL != instance) {
209 instance->OnWindowResponsive(target_window); 209 instance->OnWindowResponsive(target_window);
210 } 210 }
211 } 211 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extensions_startup.cc ('k') | chrome/browser/importer/importer_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698