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

Side by Side Diff: chrome/browser/process_singleton_win.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 "chrome/browser/process_singleton.h" 5 #include "chrome/browser/process_singleton.h"
6 6
7 #include "base/base_paths.h" 7 #include "base/base_paths.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/file_path.h" 9 #include "base/file_path.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 return PROCESS_NONE; 264 return PROCESS_NONE;
265 } 265 }
266 266
267 // The window is hung. Scan for every window to find a visible one. 267 // The window is hung. Scan for every window to find a visible one.
268 bool visible_window = false; 268 bool visible_window = false;
269 EnumThreadWindows(thread_id, 269 EnumThreadWindows(thread_id,
270 &BrowserWindowEnumeration, 270 &BrowserWindowEnumeration,
271 reinterpret_cast<LPARAM>(&visible_window)); 271 reinterpret_cast<LPARAM>(&visible_window));
272 272
273 // If there is a visible browser window, ask the user before killing it. 273 // If there is a visible browser window, ask the user before killing it.
274 if (visible_window && browser::ShowMessageBox(NULL, 274 if (visible_window && chrome::ShowMessageBox(NULL,
275 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME), 275 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME),
276 l10n_util::GetStringUTF16(IDS_BROWSER_HUNGBROWSER_MESSAGE), 276 l10n_util::GetStringUTF16(IDS_BROWSER_HUNGBROWSER_MESSAGE),
277 browser::MESSAGE_BOX_TYPE_QUESTION) == browser::MESSAGE_BOX_RESULT_NO) { 277 chrome::MESSAGE_BOX_TYPE_QUESTION) == chrome::MESSAGE_BOX_RESULT_NO) {
278 // The user denied. Quit silently. 278 // The user denied. Quit silently.
279 return PROCESS_NOTIFIED; 279 return PROCESS_NOTIFIED;
280 } 280 }
281 281
282 // Time to take action. Kill the browser process. 282 // Time to take action. Kill the browser process.
283 base::KillProcessById(process_id, content::RESULT_CODE_HUNG, true); 283 base::KillProcessById(process_id, content::RESULT_CODE_HUNG, true);
284 remote_window_ = NULL; 284 remote_window_ = NULL;
285 return PROCESS_NONE; 285 return PROCESS_NONE;
286 } 286 }
287 287
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 switch (message) { 347 switch (message) {
348 case WM_COPYDATA: 348 case WM_COPYDATA:
349 return OnCopyData(reinterpret_cast<HWND>(wparam), 349 return OnCopyData(reinterpret_cast<HWND>(wparam),
350 reinterpret_cast<COPYDATASTRUCT*>(lparam)); 350 reinterpret_cast<COPYDATASTRUCT*>(lparam));
351 default: 351 default:
352 break; 352 break;
353 } 353 }
354 354
355 return ::DefWindowProc(hwnd, message, wparam, lparam); 355 return ::DefWindowProc(hwnd, message, wparam, lparam);
356 } 356 }
OLDNEW
« no previous file with comments | « chrome/browser/printing/print_error_dialog.cc ('k') | chrome/browser/ui/cocoa/simple_message_box_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698