| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_PROCESS_SINGLETON_H_ | 5 #ifndef CHROME_BROWSER_PROCESS_SINGLETON_H_ |
| 6 #define CHROME_BROWSER_PROCESS_SINGLETON_H_ | 6 #define CHROME_BROWSER_PROCESS_SINGLETON_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
| 10 | 10 |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 private: | 121 private: |
| 122 #if !defined(OS_MACOSX) | 122 #if !defined(OS_MACOSX) |
| 123 // Timeout for the current browser process to respond. 20 seconds should be | 123 // Timeout for the current browser process to respond. 20 seconds should be |
| 124 // enough. It's only used in Windows and Linux implementations. | 124 // enough. It's only used in Windows and Linux implementations. |
| 125 static const int kTimeoutInSeconds = 20; | 125 static const int kTimeoutInSeconds = 20; |
| 126 #endif | 126 #endif |
| 127 | 127 |
| 128 bool locked_; | 128 bool locked_; |
| 129 gfx::NativeWindow foreground_window_; | 129 gfx::NativeWindow foreground_window_; |
| 130 | 130 |
| 131 #if defined(OS_WIN) | 131 #if defined(USE_AURA) |
| 132 // TODO(saintlou): The process_singleton_aura.cc is still a stub. |
| 133 #elif defined(OS_WIN) |
| 132 // This ugly behemoth handles startup commands sent from another process. | 134 // This ugly behemoth handles startup commands sent from another process. |
| 133 LRESULT OnCopyData(HWND hwnd, const COPYDATASTRUCT* cds); | 135 LRESULT OnCopyData(HWND hwnd, const COPYDATASTRUCT* cds); |
| 134 | 136 |
| 135 LRESULT CALLBACK WndProc(HWND hwnd, | 137 LRESULT CALLBACK WndProc(HWND hwnd, |
| 136 UINT message, | 138 UINT message, |
| 137 WPARAM wparam, | 139 WPARAM wparam, |
| 138 LPARAM lparam); | 140 LPARAM lparam); |
| 139 | 141 |
| 140 static LRESULT CALLBACK WndProcStatic(HWND hwnd, | 142 static LRESULT CALLBACK WndProcStatic(HWND hwnd, |
| 141 UINT message, | 143 UINT message, |
| (...skipping 17 matching lines...) Expand all Loading... |
| 159 FilePath lock_path_; | 161 FilePath lock_path_; |
| 160 | 162 |
| 161 // Path in file system to the cookie file. | 163 // Path in file system to the cookie file. |
| 162 FilePath cookie_path_; | 164 FilePath cookie_path_; |
| 163 | 165 |
| 164 // Temporary directory to hold the socket. | 166 // Temporary directory to hold the socket. |
| 165 ScopedTempDir socket_dir_; | 167 ScopedTempDir socket_dir_; |
| 166 | 168 |
| 167 // Helper class for linux specific messages. LinuxWatcher is ref counted | 169 // Helper class for linux specific messages. LinuxWatcher is ref counted |
| 168 // because it posts messages between threads. | 170 // because it posts messages between threads. |
| 169 #if !defined(USE_AURA) | |
| 170 class LinuxWatcher; | 171 class LinuxWatcher; |
| 171 scoped_refptr<LinuxWatcher> watcher_; | 172 scoped_refptr<LinuxWatcher> watcher_; |
| 172 #endif | |
| 173 #elif defined(OS_MACOSX) | 173 #elif defined(OS_MACOSX) |
| 174 // Path in file system to the lock. | 174 // Path in file system to the lock. |
| 175 FilePath lock_path_; | 175 FilePath lock_path_; |
| 176 | 176 |
| 177 // File descriptor associated with the lockfile, valid between | 177 // File descriptor associated with the lockfile, valid between |
| 178 // |Create()| and |Cleanup()|. Two instances cannot have a lock on | 178 // |Create()| and |Cleanup()|. Two instances cannot have a lock on |
| 179 // the same file at the same time. | 179 // the same file at the same time. |
| 180 int lock_fd_; | 180 int lock_fd_; |
| 181 #endif | 181 #endif |
| 182 | 182 |
| 183 DISALLOW_COPY_AND_ASSIGN(ProcessSingleton); | 183 DISALLOW_COPY_AND_ASSIGN(ProcessSingleton); |
| 184 }; | 184 }; |
| 185 | 185 |
| 186 #endif // CHROME_BROWSER_PROCESS_SINGLETON_H_ | 186 #endif // CHROME_BROWSER_PROCESS_SINGLETON_H_ |
| OLD | NEW |