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

Side by Side Diff: base/mac_util.h

Issue 2068004: Commiting http://codereview.chromium.org/2017007/show on behalf of rkc@chromi... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 void SetCursorVisibility(bool visible); 111 void SetCursorVisibility(bool visible);
112 112
113 // Should windows miniaturize on a double-click (on the title bar)? 113 // Should windows miniaturize on a double-click (on the title bar)?
114 bool ShouldWindowsMiniaturizeOnDoubleClick(); 114 bool ShouldWindowsMiniaturizeOnDoubleClick();
115 115
116 // Activates the process with the given PID. 116 // Activates the process with the given PID.
117 void ActivateProcess(pid_t); 117 void ActivateProcess(pid_t);
118 118
119 // Pulls a snapshot of the entire browser into png_representation. 119 // Pulls a snapshot of the entire browser into png_representation.
120 void GrabWindowSnapshot(NSWindow* window, 120 void GrabWindowSnapshot(NSWindow* window,
121 std::vector<unsigned char>* png_representation); 121 std::vector<unsigned char>* png_representation,
122 int* width, int* height);
122 123
123 // Takes a path to an (executable) binary and tries to provide the path to an 124 // Takes a path to an (executable) binary and tries to provide the path to an
124 // application bundle containing it. It takes the outermost bundle that it can 125 // application bundle containing it. It takes the outermost bundle that it can
125 // find (so for "/Foo/Bar.app/.../Baz.app/..." it produces "/Foo/Bar.app"). 126 // find (so for "/Foo/Bar.app/.../Baz.app/..." it produces "/Foo/Bar.app").
126 // |exec_name| - path to the binary 127 // |exec_name| - path to the binary
127 // returns - path to the application bundle, or empty on error 128 // returns - path to the application bundle, or empty on error
128 FilePath GetAppBundlePath(const FilePath& exec_name); 129 FilePath GetAppBundlePath(const FilePath& exec_name);
129 130
130 // Set the Time Machine exclusion property for the given file. 131 // Set the Time Machine exclusion property for the given file.
131 bool SetFileBackupExclusion(const FilePath& file_path, bool exclude); 132 bool SetFileBackupExclusion(const FilePath& file_path, bool exclude);
132 133
133 // Utility function to pull out a value from a dictionary, check its type, and 134 // Utility function to pull out a value from a dictionary, check its type, and
134 // return it. Returns NULL if the key is not present or of the wrong type. 135 // return it. Returns NULL if the key is not present or of the wrong type.
135 CFTypeRef GetValueFromDictionary(CFDictionaryRef dict, 136 CFTypeRef GetValueFromDictionary(CFDictionaryRef dict,
136 CFStringRef key, 137 CFStringRef key,
137 CFTypeID expected_type); 138 CFTypeID expected_type);
138 139
139 // Sets the process name as displayed in Activity Monitor to process_name. 140 // Sets the process name as displayed in Activity Monitor to process_name.
140 void SetProcessName(CFStringRef process_name); 141 void SetProcessName(CFStringRef process_name);
141 142
142 } // namespace mac_util 143 } // namespace mac_util
143 144
144 #endif // BASE_MAC_UTIL_H_ 145 #endif // BASE_MAC_UTIL_H_
OLDNEW
« no previous file with comments | « app/x11_util.cc ('k') | base/mac_util.mm » ('j') | chrome/chrome_browser.gypi » ('J')

Powered by Google App Engine
This is Rietveld 408576698