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

Side by Side Diff: chrome/browser/process_singleton_win.cc

Issue 14698027: Move winaura specific methods and members from chrome/browser/browser_process.h to chrome/browser/b… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix includes in testing_browser_process_platform_part.h Created 7 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 | 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 <shellapi.h> 7 #include <shellapi.h>
8 8
9 #include "base/base_paths.h" 9 #include "base/base_paths.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 20 matching lines...) Expand all
31 #include "chrome/common/chrome_paths_internal.h" 31 #include "chrome/common/chrome_paths_internal.h"
32 #include "chrome/common/chrome_switches.h" 32 #include "chrome/common/chrome_switches.h"
33 #include "chrome/installer/util/wmi.h" 33 #include "chrome/installer/util/wmi.h"
34 #include "content/public/common/result_codes.h" 34 #include "content/public/common/result_codes.h"
35 #include "grit/chromium_strings.h" 35 #include "grit/chromium_strings.h"
36 #include "grit/generated_resources.h" 36 #include "grit/generated_resources.h"
37 #include "net/base/escape.h" 37 #include "net/base/escape.h"
38 #include "ui/base/l10n/l10n_util.h" 38 #include "ui/base/l10n/l10n_util.h"
39 #include "ui/base/win/hwnd_util.h" 39 #include "ui/base/win/hwnd_util.h"
40 40
41 #if defined(USE_AURA)
42 #include "chrome/browser/browser_process_platform_part_aurawin.h"
43 #else
44 #include "chrome/browser/browser_process_platform_part.h"
45 #endif
46
41 namespace { 47 namespace {
42 48
43 const char kLockfile[] = "lockfile"; 49 const char kLockfile[] = "lockfile";
44 50
45 const char kSearchUrl[] = 51 const char kSearchUrl[] =
46 "http://www.google.com/search?q=%s&sourceid=chrome&ie=UTF-8"; 52 "http://www.google.com/search?q=%s&sourceid=chrome&ie=UTF-8";
47 53
48 const int kMetroChromeActivationTimeoutMs = 3000; 54 const int kMetroChromeActivationTimeoutMs = 3000;
49 55
50 // A helper class that acquires the given |mutex| while the AutoLockMutex is in 56 // A helper class that acquires the given |mutex| while the AutoLockMutex is in
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 return PROCESS_NONE; 405 return PROCESS_NONE;
400 } 406 }
401 407
402 ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessOrCreate() { 408 ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessOrCreate() {
403 ProcessSingleton::NotifyResult result = PROCESS_NONE; 409 ProcessSingleton::NotifyResult result = PROCESS_NONE;
404 if (!Create()) { 410 if (!Create()) {
405 result = NotifyOtherProcess(); 411 result = NotifyOtherProcess();
406 if (result == PROCESS_NONE) 412 if (result == PROCESS_NONE)
407 result = PROFILE_IN_USE; 413 result = PROFILE_IN_USE;
408 } else { 414 } else {
409 g_browser_process->PlatformSpecificCommandLineProcessing( 415 g_browser_process->platform_part()->PlatformSpecificCommandLineProcessing(
410 *CommandLine::ForCurrentProcess()); 416 *CommandLine::ForCurrentProcess());
411 } 417 }
412 return result; 418 return result;
413 } 419 }
414 420
415 // Look for a Chrome instance that uses the same profile directory. If there 421 // Look for a Chrome instance that uses the same profile directory. If there
416 // isn't one, create a message window with its title set to the profile 422 // isn't one, create a message window with its title set to the profile
417 // directory path. 423 // directory path.
418 bool ProcessSingleton::Create() { 424 bool ProcessSingleton::Create() {
419 static const wchar_t kMutexName[] = L"Local\\ChromeProcessSingletonStartup!"; 425 static const wchar_t kMutexName[] = L"Local\\ChromeProcessSingletonStartup!";
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
563 switch (message) { 569 switch (message) {
564 case WM_COPYDATA: 570 case WM_COPYDATA:
565 return OnCopyData(reinterpret_cast<HWND>(wparam), 571 return OnCopyData(reinterpret_cast<HWND>(wparam),
566 reinterpret_cast<COPYDATASTRUCT*>(lparam)); 572 reinterpret_cast<COPYDATASTRUCT*>(lparam));
567 default: 573 default:
568 break; 574 break;
569 } 575 }
570 576
571 return ::DefWindowProc(hwnd, message, wparam, lparam); 577 return ::DefWindowProc(hwnd, message, wparam, lparam);
572 } 578 }
OLDNEW
« no previous file with comments | « chrome/browser/metro_viewer/metro_viewer_process_host_win.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698