| 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 |
| 11 #if defined(OS_WIN) | 11 #if defined(OS_WIN) |
| 12 #include <windows.h> | 12 #include <windows.h> |
| 13 #endif // defined(OS_WIN) | 13 #endif // defined(OS_WIN) |
| 14 | 14 |
| 15 #include "base/basictypes.h" | 15 #include "base/basictypes.h" |
| 16 #include "base/logging.h" | 16 #include "base/logging.h" |
| 17 #include "base/memory/ref_counted.h" | 17 #include "base/memory/ref_counted.h" |
| 18 #include "base/threading/non_thread_safe.h" | 18 #include "base/threading/non_thread_safe.h" |
| 19 #include "ui/gfx/native_widget_types.h" | 19 #include "ui/gfx/native_widget_types.h" |
| 20 | 20 |
| 21 #if defined(OS_POSIX) | 21 #if defined(OS_POSIX) |
| 22 #include "base/file_path.h" | 22 #include "base/file_path.h" |
| 23 #endif // defined(OS_POSIX) | 23 #endif // defined(OS_POSIX) |
| 24 | 24 |
| 25 #if defined(USE_X11) | 25 #if defined(USE_X11) |
| 26 #include "base/memory/scoped_temp_dir.h" | 26 #include "base/scoped_temp_dir.h" |
| 27 #endif // defined(USE_X11) | 27 #endif // defined(USE_X11) |
| 28 | 28 |
| 29 class CommandLine; | 29 class CommandLine; |
| 30 class FilePath; | 30 class FilePath; |
| 31 | 31 |
| 32 // ProcessSingleton ---------------------------------------------------------- | 32 // ProcessSingleton ---------------------------------------------------------- |
| 33 // | 33 // |
| 34 // This class allows different browser processes to communicate with | 34 // This class allows different browser processes to communicate with |
| 35 // each other. It is named according to the user data directory, so | 35 // each other. It is named according to the user data directory, so |
| 36 // we can be sure that no more than one copy of the application can be | 36 // we can be sure that no more than one copy of the application can be |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 // File descriptor associated with the lockfile, valid between | 172 // File descriptor associated with the lockfile, valid between |
| 173 // |Create()| and |Cleanup()|. Two instances cannot have a lock on | 173 // |Create()| and |Cleanup()|. Two instances cannot have a lock on |
| 174 // the same file at the same time. | 174 // the same file at the same time. |
| 175 int lock_fd_; | 175 int lock_fd_; |
| 176 #endif | 176 #endif |
| 177 | 177 |
| 178 DISALLOW_COPY_AND_ASSIGN(ProcessSingleton); | 178 DISALLOW_COPY_AND_ASSIGN(ProcessSingleton); |
| 179 }; | 179 }; |
| 180 | 180 |
| 181 #endif // CHROME_BROWSER_PROCESS_SINGLETON_H_ | 181 #endif // CHROME_BROWSER_PROCESS_SINGLETON_H_ |
| OLD | NEW |