summaryrefslogtreecommitdiffstats
path: root/base/mac_util.h
Commit message (Collapse)AuthorAgeFilesLines
* Move base/mac_util.h to base/mac and use the base::mac namespace.brettw@chromium.org2011-01-011-247/+0
| | | | | | | | | | | Fix up callers to use the new location & namespace. Remove includes from  files where it wasn't necessary. TEST=it compiles BUG=none Review URL: http://codereview.chromium.org/6046009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70359 0039d316-1c4b-4281-b951-d872f2087c98
* Fix up clang problemdmaclach@chromium.org2010-12-171-1/+1
| | | | | | | | | BUG=none TEST=BUILD Review URL: http://codereview.chromium.org/6013002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69565 0039d316-1c4b-4281-b951-d872f2087c98
* Add support for easily casting CFTypes to NSTypesdmaclach@chromium.org2010-12-171-4/+58
| | | | | | | | | | | BUG=NONE TEST=BUILD Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=69552 Review URL: http://codereview.chromium.org/5857006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69561 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 69552 - Add support for easily casting CFTypes to NSTypesdmaclach@chromium.org2010-12-171-48/+0
| | | | | | | | | | | | BUG=NONE TEST=BUILD Review URL: http://codereview.chromium.org/5857006 TBR=dmaclach@chromium.org Review URL: http://codereview.chromium.org/5958004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69553 0039d316-1c4b-4281-b951-d872f2087c98
* Add support for easily casting CFTypes to NSTypesdmaclach@chromium.org2010-12-171-0/+48
| | | | | | | | | BUG=NONE TEST=BUILD Review URL: http://codereview.chromium.org/5857006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69552 0039d316-1c4b-4281-b951-d872f2087c98
* Mac: Let out-of-process tests run in bundled mode for their whole lifetime.thakis@chromium.org2010-11-151-0/+1
| | | | | | | | | | | | | | | | | | | Since out-of-process tests override the EXE path to look like the bundled app, it makes sense to override AmIBundled() as well. This is important because the renderer process started from browser_tests runs as bundled, and if browser and renderer process don't agree on bundled-ness, the "load plugin" requests for internal plugins from the renderer have the wrong plugin path, causing the plugin load to fail. Also add a DCHECK that makes sure that AmIBundled() doesn't flip-flop. This makes PDFBrowserTest work on mac, so enable it. It looks like even unit_tests uses the out-of-process test runner, so this change is a bit hairy :-/ BUG=61258,63183 TEST=all existing tests still pass, PDFBrowserTest.* passes. Review URL: http://codereview.chromium.org/4947002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66156 0039d316-1c4b-4281-b951-d872f2087c98
* Dynamic policy refresh support for the Mac.mnissler@chromium.org2010-10-291-0/+14
| | | | | | | | | | | Adapt the file watching code we already had for ConfigDirPolicyProvider to support a loader delegate, make the old code use it and change the Mac policy provider to watch for changes to the plist file in /Library/Managed Preferences/<username>. BUG=52040 TEST=unit tests Review URL: http://codereview.chromium.org/4062002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64415 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor the code for loading icons into the PageInfoModel.rsesek@chromium.org2010-10-021-0/+4
| | | | | | | | | | | | This code is basically duplicated twice on each platform. This consolidates all that into PageInfoModel::GetIconImage() and renames the SectionInfo.state to icon_id. BUG=none TEST=Page info windows and bubbles work as they did before across all platforms. Review URL: http://codereview.chromium.org/3560004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61308 0039d316-1c4b-4281-b951-d872f2087c98
* Re-land. Fixed previous errors.dimich@chromium.org2010-08-271-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | Implement OSX version for "Start on Login" for background-enabled extensions. When user installs first background-enabled extension we set Chrome to be a hidden "Login Item", and when user uninstalls the last one, we remove Chrome from the "Login Items List". Login Items are the apps that are listed in Systempreferences->Accounts->Login Items, or which have a "Open on Login" check for their Dock icon. Since we manipulate the user-faced UI item here, we try to do it in a way that will likely not interfere with user settings. Most typically, users do not use 'hidden' property, so if we ever encounter setting w/o this property, we won't override. Also there is a hidden preference used to remember the fact that Chrome changed the settings earlier - to avoid override on uninstall of the last persistent app in opposite case. Using the same bit that user can manipulate separately and perhaps even knows about is beneficial since it provides for unified place to "start Chrome on Login" and reduces confusion. Implementation for Login Items List access uses LSSharedFileList API that is available starting 10.5, which I think is our minimal supported version of OSX. BUG=43382 TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=57569 Reverted Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=57614 Reverted Review URL: http://codereview.chromium.org/3163029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57699 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 57614 - Re-land. Fixed previous build error.dimich@chromium.org2010-08-271-20/+0
| | | | | | | | | | | | | | | It looks like it broke browser_tests. Will revert and investigate. Implement OSX version for "Start on Login" for background-enabled extensions. Review URL: http://codereview.chromium.org/3163029 TBR=dimich@chromium.org Review URL: http://codereview.chromium.org/3226002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57625 0039d316-1c4b-4281-b951-d872f2087c98
* Re-land. Fixed previous build error.dimich@chromium.org2010-08-271-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | Implement OSX version for "Start on Login" for background-enabled extensions. When user installs first background-enabled extension we set Chrome to be a hidden "Login Item", and when user uninstalls the last one, we remove Chrome from the "Login Items List". Login Items are the apps that are listed in Systempreferences->Accounts->Login Items, or which have a "Open on Login" check for their Dock icon. Since we manipulate the user-faced UI item here, we try to do it in a way that will likely not interfere with user settings. Most typically, users do not use 'hidden' property, so if we ever encounter setting w/o this property, we won't override. Also there is a hidden preference used to remember the fact that Chrome changed the settings earlier - to avoid override on uninstall of the last persistent app in opposite case. Using the same bit that user can manipulate separately and perhaps even knows about is beneficial since it provides for unified place to "start Chrome on Login" and reduces confusion. Implementation for Login Items List access uses LSSharedFileList API that is available starting 10.5, which I think is our minimal supported version of OSX. BUG=43382 TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=57569 Reverted, trying to re-land. Review URL: http://codereview.chromium.org/3163029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57614 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 57569 - Implement OSX version for "Start on Login" for ↵dimich@chromium.org2010-08-261-20/+0
| | | | | | | | | | | background-enabled extensions. Review URL: http://codereview.chromium.org/3163029 TBR=dimich@chromium.org Review URL: http://codereview.chromium.org/3130052 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57573 0039d316-1c4b-4281-b951-d872f2087c98
* Implement OSX version for "Start on Login" for background-enabled extensions.dimich@chromium.org2010-08-261-0/+20
| | | | | | | | | | | | | | | | | | | | When user installs first bacground-enabled extension we set Chrome to be a "Login Item", and when user uninstalls the last one, we remove Chrome from the "Login Items List". Login Items are the apps that are listed in Systempreferences->Accounts->Login Items, or which have a "Open on Login" check for their Dock icon. Since we manipulate the user-faced UI item here, we try to do it minimally (only on first installed and last uninstalled background app) with understanding that when we have UI for install/uninstall we'll convert this into more visible, cancellable suggestion on that UI. Using the same bit that user can manipulate separately and perhaps even knows about is beneficial since it provides for unified place to "start Chrome on Login" and reduces confusion. The patch also removes SetKeepAlive/EndKeepAlive calls for OSX since on OSX they are already used properly to keep Chrome alive when all windows are closed (in other words, on Mac there is only one behavior that also fits what is needed for background apps) Implementation for Login Items List access uses LSSharedFileList API that is availabel starting 10.5, which I think is our minimal supported version of OSX. Also added a check in BackgroundModeManager::RemoveStatusTrayIcon() which could crash on OSX because there is no icon_tray_ yet. Review URL: http://codereview.chromium.org/3163029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57569 0039d316-1c4b-4281-b951-d872f2087c98
* Move NSImage-to-CGImageRef conversion code into a common helper function in ↵rsesek@chromium.org2010-07-281-0/+8
| | | | | | | | | | | base/mac_util.h. BUG=49571 TEST=Covered by unit_tests. Review URL: http://codereview.chromium.org/3072005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53997 0039d316-1c4b-4281-b951-d872f2087c98
* `#pragma once` for app, base, chrome, gfx, ipc, net, skia, viewsthakis@chromium.org2010-07-261-0/+1
| | | | | | | | | BUG=50273 TEST=everything still builds, build is 10% faster on windows, same speed on mac/linux TBR: erg git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53716 0039d316-1c4b-4281-b951-d872f2087c98
* Commiting http://codereview.chromium.org/2017007/show on behalf of ↵zelidrag@chromium.org2010-05-141-1/+2
| | | | | | | | | | | | | | | | | | | | rkc@chromium.org. This change hooks issue report dialog with Google Feedback backend for ChromeOS. The dialog is going to be used only for Chrome OS at the moment, the previous mechanism is kept intact for other operating systems. Image and System Info reporting is disabled at the moment; for image, we need feedback to get their changes in production, for reporting, the system scripts need to be added (basic Chrome and OS version info is being sent with the report) BUG=chromium-os:2761 TEST=none, work in progress TBR=zelidrag Review URL: http://codereview.chromium.org/2068004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47244 0039d316-1c4b-4281-b951-d872f2087c98
* Mac: move should-double-click-to-minimize code into mac_util.viettrungluu@chromium.org2010-03-121-0/+3
| | | | | | | | | | | | Also make the fullscreen code do the right thing in theory, even though it doesn't work and I'll probably shortly remove it. BUG=none TEST=Double-clicking on the tab strip should or should not minimize the window according to the system prefs setting; click in the area beside the tabs. Review URL: http://codereview.chromium.org/859004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41413 0039d316-1c4b-4281-b951-d872f2087c98
* [Mac] When in fullscreen mode, ties the menubar shown state to the overlay ↵rohitrao@chromium.org2010-03-031-12/+32
| | | | | | | | | | | shown state. BUG=36610 TEST=Go fullscreen. Menubar should only be shown when the overlay is fully visible. TEST=While in fullscreen mode, fullscreen a youtube video. Menubar should be autohidden (mousing to the top of the screen should show it). Review URL: http://codereview.chromium.org/661380 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40529 0039d316-1c4b-4281-b951-d872f2087c98
* Give Mac plugin processes descriptive names for Activity Monitorstuartmorgan@chromium.org2010-02-241-0/+3
| | | | | | | | | BUG=none TEST=Open Activity Monitor, and visit a page with a plugin. The plugin process should show the name of the plugin. Review URL: http://codereview.chromium.org/659007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39950 0039d316-1c4b-4281-b951-d872f2087c98
* Hide/show cursor according to NSCursor requests.avi@chromium.org2010-02-021-0/+3
| | | | | | | | | BUG=http://crbug.com/32703 TEST=when hiding cursor (Flash 10.1), cursor hides (but doesn't stay hidden; that's a different bug) Review URL: http://codereview.chromium.org/560003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37841 0039d316-1c4b-4281-b951-d872f2087c98
* Moved GetUserDirectory() into mac_util.mm.akalin@chromium.org2010-01-271-0/+12
| | | | | | | | | | | | | | | Made mac_util.mm and chrome_paths_mac.mm use GetUserDirectory(). Made firefox_importer_utils_mac.mm use PathService. Added unittests for GetUserDirectory(). BUG=22045 TEST=trybots Review URL: http://codereview.chromium.org/548123 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37206 0039d316-1c4b-4281-b951-d872f2087c98
* Separate ProxyResolverMac and ProxyConfigServiceMac into their own files and ↵hayato@chromium.org2009-12-101-0/+6
| | | | | | | | | | extract common utility functions into other files. TEST=trybot and MacUtilTest in base_unittests BUG=27310 Review URL: http://codereview.chromium.org/463028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34243 0039d316-1c4b-4281-b951-d872f2087c98
* For the immediate milestone, exclude History and Thumbnails from being ↵mrossetti@chromium.org2009-11-111-0/+3
| | | | | | | | | | | backed up by Time Machine. The bug describes appropriate long-term solutions to this problem. BUG=259595 TEST=Launch Chrome. Inspect the following files found in ~/Library/Application Support/Chromium/Default/: a) History, b) History-journal, c) Thumbnails, and d) Thumbnails-journal and verify that they are not being backed up by Time Machine. Review URL: http://codereview.chromium.org/387016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31644 0039d316-1c4b-4281-b951-d872f2087c98
* Mac: Implement about:memory.viettrungluu@chromium.org2009-11-051-0/+8
| | | | | | | | | | | | | | | This implements about:memory on Mac. It calls /bin/ps to obtain information about processes (this is Apple's officially supported "API"). Unfortunately, ps provides fairly minimal information (rss and vsize); top is better, but not a stable API -- it has changed greatly between Mac OS 10.5 and 10.6, and moreover the 10.6 version is more limited in its output formatting. BUG=9653 TEST=Go to about:memory under a variety of conditions (with a variety of browsers loaded). Review URL: http://codereview.chromium.org/333008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31168 0039d316-1c4b-4281-b951-d872f2087c98
* Don't allow the browser to stay above a modal plugin window (Mac)stuartmorgan@chromium.org2009-11-041-0/+3
| | | | | | | | | | | There's a flicker of the modal window being hidden then coming forward again, and the menus still work, so we'll most likely have fake the modality more aggressively at some point. This gets us the basic infrastructure though, and solves the severe usability problem. BUG=20798 TEST=Open a modal plugin window (e.g., Gmail upload). Switch to another app, then back to Chrome; the plugin window should come to the front. Review URL: http://codereview.chromium.org/355021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30965 0039d316-1c4b-4281-b951-d872f2087c98
* Add GrabWindowSnapshot method to mac_util class, and a unit test.mirandac@chromium.org2009-10-271-1/+7
| | | | | | | | BUG= none TEST= none Review URL: http://codereview.chromium.org/333018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30199 0039d316-1c4b-4281-b951-d872f2087c98
* Change Mac fullscreen mode to be a stack, not a flag. This fixes crashes andamanda@chromium.org2009-10-111-0/+12
| | | | | | | | | | | | | misbehavior of fullscreen browser windows and plugins, especially when they interact. BUG=23571,24216 TEST=open up multiple browser windows, make them fullscreen, and go to pages (such as video players) that can invoke full screen plugins. The menu bar should hide when the first window becomes fullscreen, show again after the last window stops being fullscreen, and not crash at any of those transitions. Review URL: http://codereview.chromium.org/269022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28690 0039d316-1c4b-4281-b951-d872f2087c98
* Move all resources into the framework.mark@chromium.org2009-10-071-0/+1
| | | | | | | | | | | | | | BUG=14610 (in support of unbreaking auto-update) TEST=The .app's Contents/Resources folder should not contain the resources that are moving to the .framework's Resources folder; The .app's Contents/Resources folder should still contain app.icns, document.icns, the helper .app, and a whole slew of .lprojs that only contain InfoPlist.strings; Make sure Breakpad still works in the browser, renderer, and other process types. Review URL: http://codereview.chromium.org/256062 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28262 0039d316-1c4b-4281-b951-d872f2087c98
* Adjust color spaces so that Mac Chrome renders colors properly.amanda@chromium.org2009-09-031-0/+8
| | | | | | | | | | | BUG=19951,20552 TEST=compare pages rendered in Chromium and Safari. They should appear the same. mark: review jrg/brettw: FYI Review URL: http://codereview.chromium.org/194013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25380 0039d316-1c4b-4281-b951-d872f2087c98
* Change when we enable Apple's Crash reporter.jeremy@chromium.org2009-08-311-0/+3
| | | | | | | | | | | | | | | | | | | | Enable Apple Crash Reporter for Browser process in Non-Debug builds. * Introduce mac_util::IsBackgroundProcess(). * Invert logic around Breakpad Enabling/Disabling to make it clearer. * Honor the kDisableBreakpad switch. Our new policy: * Breakpad is enabled/disabled based on the user stats reporting opt-in flag - this hasn't changed. * Always disable Apple Crash in background processes (plug-in, renderer, etc). * If Breakpad is enabled browser crashes will be passed to Crash Reporter. * If Breakpad is NOT enabled browser [or any other foreground app] crashes will be passed to Crash Reporter in Release builds. Effectively this means that we now enable Crash Reporter for the browser process in Chromium release builds so these will no longer crash silently with no trace. Review URL: http://codereview.chromium.org/180048 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24959 0039d316-1c4b-4281-b951-d872f2087c98
* Use real creator code for Keychain items. Instead of hard-coding 'rimZ', usemark@chromium.org2009-08-111-6/+17
| | | | | | | | | | | the correct creator code for the application. This is 'rimZ' for branded Google Chrome, and 'Cr24' for Chromium. BUG=19000 TEST=No functional change in Google Chrome-branded builds Review URL: http://codereview.chromium.org/164332 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23074 0039d316-1c4b-4281-b951-d872f2087c98
* First cut at Safari Import - Home Page & History Only.jeremy@chromium.org2009-07-311-0/+3
| | | | | | Review URL: http://codereview.chromium.org/159668 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22179 0039d316-1c4b-4281-b951-d872f2087c98
* Add a macutil for the main app bundle and overridethomasvl@chromium.org2009-03-031-0/+17
| | | | | | | | | | | | - provide apis to get and override the app bundle - w/in the core code, use this api for fetching the bundle - render sandbox config - resource bundles - test shell font - w/in the unittest boot straps, use the mac util to override the bundle so resources can be found. Review URL: http://codereview.chromium.org/28214 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10798 0039d316-1c4b-4281-b951-d872f2087c98
* Load the Ahem font from the source tree when not running bundled, formark@chromium.org2008-12-101-0/+3
| | | | | | | test_shell_tests. Review URL: http://codereview.chromium.org/13719 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6738 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup of the path service. (With some extra utilities to be used later.)avi@google.com2008-12-091-0/+19
Review URL: http://codereview.chromium.org/13260 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6584 0039d316-1c4b-4281-b951-d872f2087c98