| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 | 7 |
| 8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
| 9 | 9 |
| 10 #if defined(OS_WIN) | 10 #if defined(OS_WIN) |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 WPARAM wparam, | 85 WPARAM wparam, |
| 86 LPARAM lparam) { | 86 LPARAM lparam) { |
| 87 ProcessSingleton* msg_wnd = reinterpret_cast<ProcessSingleton*>( | 87 ProcessSingleton* msg_wnd = reinterpret_cast<ProcessSingleton*>( |
| 88 GetWindowLongPtr(hwnd, GWLP_USERDATA)); | 88 GetWindowLongPtr(hwnd, GWLP_USERDATA)); |
| 89 return msg_wnd->WndProc(hwnd, message, wparam, lparam); | 89 return msg_wnd->WndProc(hwnd, message, wparam, lparam); |
| 90 } | 90 } |
| 91 | 91 |
| 92 HWND remote_window_; // The HWND_MESSAGE of another browser. | 92 HWND remote_window_; // The HWND_MESSAGE of another browser. |
| 93 HWND window_; // The HWND_MESSAGE window. | 93 HWND window_; // The HWND_MESSAGE window. |
| 94 #elif defined(OS_LINUX) | 94 #elif defined(OS_LINUX) |
| 95 // Set up a socket and sockaddr appropriate for messaging. | |
| 96 void SetupSocket(int* sock, struct sockaddr_un* addr); | |
| 97 | |
| 98 // Path in file system to the socket. | 95 // Path in file system to the socket. |
| 99 FilePath socket_path_; | 96 FilePath socket_path_; |
| 100 | 97 |
| 101 // Helper class for linux specific messages. LinuxWatcher is ref counted | 98 // Helper class for linux specific messages. LinuxWatcher is ref counted |
| 102 // because it posts messages between threads. | 99 // because it posts messages between threads. |
| 103 class LinuxWatcher; | 100 class LinuxWatcher; |
| 104 scoped_refptr<LinuxWatcher> watcher_; | 101 scoped_refptr<LinuxWatcher> watcher_; |
| 105 #endif | 102 #endif |
| 106 | 103 |
| 104 #if defined(OS_WIN) || defined(OS_LINUX) |
| 105 // Timeout for the current browser process to respond. 20 seconds should be |
| 106 // enough. It's only used in Windows and Linux implementations. |
| 107 static const int kTimeoutInSeconds = 20; |
| 108 #endif |
| 109 |
| 107 DISALLOW_COPY_AND_ASSIGN(ProcessSingleton); | 110 DISALLOW_COPY_AND_ASSIGN(ProcessSingleton); |
| 108 }; | 111 }; |
| 109 | 112 |
| 110 #endif // CHROME_BROWSER_PROCESS_SINGLETON_H_ | 113 #endif // CHROME_BROWSER_PROCESS_SINGLETON_H_ |
| OLD | NEW |