OLD | NEW |
1 // Copyright (c) 2008-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2008-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 BASE_MAC_UTIL_H_ | 5 #ifndef BASE_MAC_UTIL_H_ |
6 #define BASE_MAC_UTIL_H_ | 6 #define BASE_MAC_UTIL_H_ |
7 | 7 |
8 #include <Carbon/Carbon.h> | 8 #include <Carbon/Carbon.h> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 // For example, if there are no other outstanding requests for full screen, | 74 // For example, if there are no other outstanding requests for full screen, |
75 // this will show the menu bar. Must be called on main thread. | 75 // this will show the menu bar. Must be called on main thread. |
76 void ReleaseFullScreen(); | 76 void ReleaseFullScreen(); |
77 | 77 |
78 // Activates the process with the given PID. | 78 // Activates the process with the given PID. |
79 void ActivateProcess(pid_t); | 79 void ActivateProcess(pid_t); |
80 | 80 |
81 // Pulls a snapshot of the entire browser into png_representation. | 81 // Pulls a snapshot of the entire browser into png_representation. |
82 void GrabWindowSnapshot(NSWindow* window, | 82 void GrabWindowSnapshot(NSWindow* window, |
83 std::vector<unsigned char>* png_representation); | 83 std::vector<unsigned char>* png_representation); |
| 84 |
| 85 // Takes a path to an (executable) binary and tries to provide the path to an |
| 86 // application bundle containing it. It takes the outermost bundle that it can |
| 87 // find (so for "/Foo/Bar.app/.../Baz.app/..." it produces "/Foo/Bar.app"). |
| 88 // |exec_name| - path to the binary |
| 89 // returns - path to the application bundle, or empty on error |
| 90 FilePath GetAppBundlePath(const FilePath& exec_name); |
| 91 |
84 } // namespace mac_util | 92 } // namespace mac_util |
85 | 93 |
86 #endif // BASE_MAC_UTIL_H_ | 94 #endif // BASE_MAC_UTIL_H_ |
OLD | NEW |