summaryrefslogtreecommitdiffstats
path: root/chrome/browser/app_controller_mac.h
Commit message (Collapse)AuthorAgeFilesLines
* mac: Remove now-unneeded includes of cocoa_protocols.hthakis@chromium.org2012-07-261-1/+0
| | | | | | | | | | BUG=137676 TEST=compiles TBR=OWNERS Review URL: https://chromiumcodereview.appspot.com/10831025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148560 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the rest of #pragma once in one big CL.ajwong@chromium.org2012-07-111-1/+0
| | | | | | | | | For context see this thread: https://groups.google.com/a/chromium.org/forum/?fromgroups#!topic/chromium-dev/RMcVNGjB4II TBR=thakis,pkasting,jam git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146163 0039d316-1c4b-4281-b951-d872f2087c98
* Move auto-hiding desktop bar computation from PanelManager to ↵jianli@chromium.org2012-04-101-0/+12
| | | | | | | | | | | DisplaySettingsProvider BUG=none TEST=existing tests due to no new functionality Review URL: https://chromiumcodereview.appspot.com/9689035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@131570 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the old about window for MacChrome.csilv@chromium.org2012-03-281-2/+0
| | | | | | | BUG=119389 Review URL: https://chromiumcodereview.appspot.com/9873015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@129519 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor Browser window creation.avi@chromium.org2012-02-091-0/+15
| | | | | | | | | | | | Funnel new normal/incognito window creation through bottleneck function, expose externally. Switch Mac to use it in no-open-browser-window cases. BUG=113297 TEST=as in bug Review URL: http://codereview.chromium.org/9370002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@121322 0039d316-1c4b-4281-b951-d872f2087c98
* Better fix for Lion dictionary popover cmd-W bug.asvitkine@chromium.org2012-01-181-3/+3
| | | | | | | | | | | | | | | | | | This reverts http://crrev.com/117681 and http://crrev.com/104931 and instead uses new 10.7 notifications to change the shortcuts on Close Tab and Close Window items, so that cmd-W does a "Close Window" when the dictionary is open. The above is also how Safari appears to solve this issue, as can be seen by going to the File menu when the dictionary popover is up. BUG=104931, 110306, 109061 TEST=1. Open a tab and double 3-finger tap on a word to bring up the dictionary popup. Hit cmd-W. The popup should close but the tab should stay open. Hit cmd-W again. The tab should close. 2. Try cmd-shift-W with > 1 tab open. The window should close. 3. Open a window that doesn't have tabs (e.g. Chrome -> About Chrome). File -> Close Tab should be disabled. Review URL: http://codereview.chromium.org/9230011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118131 0039d316-1c4b-4281-b951-d872f2087c98
* Fix Lion dictionary popup staying after tab-close via cmd-W.asvitkine@chromium.org2012-01-031-1/+4
| | | | | | | | | | | | | | | | | This was caused by the close menu item not sending a -[performClose:], which was what the popup was looking for. Adds some unit tests and refactors some code to make it more testable. BUG=104931 TEST=Open a tab and double 3-finger tap on a word to bring up the dictionary popup. Hit cmd-W. The popup should close but they tab should stay open. Hit cmd-W again. The tab should close. Try cmd-shift-W with > 1 tab open. The window should close. Review URL: http://codereview.chromium.org/9026016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116144 0039d316-1c4b-4281-b951-d872f2087c98
* [Mac] Add the Profile menu to the main menubar.rsesek@chromium.org2011-07-191-0/+5
| | | | | | | | | | | | | | | | This creates a ProfileMenuController that is owned by the AppController. It is responsible for managing the menu and menu item title. XIB changes: * Add a new menu item with no submenu called Profile with tag IDC_PROFILE_MAIN_MENU. BUG=86179 TEST=With --multi-profiles, a Profile menu is displayed in the menubar. Review URL: http://codereview.chromium.org/7331029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93080 0039d316-1c4b-4281-b951-d872f2087c98
* Rename -[AppController defaultProfile] to |-lastProfile|.rsesek@chromium.org2011-06-201-1/+1
| | | | | | | | | | BUG=86179 TEST=none Review URL: http://codereview.chromium.org/7206025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89708 0039d316-1c4b-4281-b951-d872f2087c98
* [Mac] Add the ability to rebuild items in the main menubar when the profile ↵rsesek@chromium.org2011-06-171-0/+6
| | | | | | | | | | | | changes. BUG=86179 TEST=None; no behavior change. Review URL: http://codereview.chromium.org/7185018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89522 0039d316-1c4b-4281-b951-d872f2087c98
* Reverted r88133 (http://codereview.chromium.org/7065054/) , and removed only ↵shinyak@google.com2011-06-161-0/+7
| | | | | | | | | | | | | | | | | | tab count check. XIB Changes: * Reverted the change r88133. * Make the default key equivalent of 'Close Tab' nothing as the previous one is so. * Make the default key equivalent of 'Close Window' Cmd+w as well. * Added the referencing outlets from 'Close Tab' and 'Close Window' as well. BUG=85727 TEST=Observe that About dialog and task manager can be closed with Cmd+w. Also a usual window having only one tab can be closed with Cmd+Shift+w. Review URL: http://codereview.chromium.org/7097010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89297 0039d316-1c4b-4281-b951-d872f2087c98
* Removed the code that checks the tab number.shinyak@google.com2011-06-071-7/+0
| | | | | | | | | | | | | | | | | | | | 'Close Window' can be used even if a window has single tab. NOTE: Cmd+w closes a window even if there is a single tab. XIB Changes: * Make the default key equivalent of 'Close Tab' Cmd+w * Make the default key equivalent of 'Close Window' Cmd+Shift+w * Remove the referencing outlets from 'Close Tab' and 'Close Window' No other changes are made. BUG=20569 TEST=press Cmd+Shift+w on a window having only one tab. Review URL: http://codereview.chromium.org/7065054 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88133 0039d316-1c4b-4281-b951-d872f2087c98
* Mac. Add new Bookmarks submenu to Wrench menu. maf@chromium.org2011-05-111-0/+2
| | | | | | | | BUG=81281,81263 TEST=None Review URL: http://codereview.chromium.org/7002020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85060 0039d316-1c4b-4281-b951-d872f2087c98
* Move some files from base to base/memory.levin@chromium.org2011-03-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | raw_scoped_refptr_mismatch_checker.h ref_counted.cc ref_counted.h ref_counted_memory.cc ref_counted_memory.h ref_counted_unittest.cc scoped_callback_factory.h scoped_comptr_win.h scoped_handle.h scoped_native_library.cc scoped_native_library.h scoped_native_library_unittest.cc scoped_nsobject.h scoped_open_process.h scoped_ptr.h scoped_ptr_unittest.cc scoped_temp_dir.cc scoped_temp_dir.h scoped_temp_dir_unittest.cc scoped_vector.h singleton.h singleton_objc.h singleton_unittest.cc linked_ptr.h linked_ptr_unittest.cc weak_ptr.cc weak_ptr.h weak_ptr_unittest.cc BUG=None TEST=Compile Review URL: http://codereview.chromium.org/6714032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79524 0039d316-1c4b-4281-b951-d872f2087c98
* [Mac] Confirm-to-quit: Add an option in the app menu.rsesek@chromium.org2011-03-211-1/+4
| | | | | | | | | | | | | | | | This option is off by default. This CL also removes the command line flag and the about:flags strings. XIB changes: * Add a new menu item and separator. * Wire up the menu item to -[AppController toggleConfirmToQuit:] BUG=60591 TEST=Go to Chromium menu. See "Warn Before Quitting (Cmd+Q)". Select it to enable/disable. Feature works as before, respecting this flag. Review URL: http://codereview.chromium.org/6708058 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78920 0039d316-1c4b-4281-b951-d872f2087c98
* [Mac] Remove a dead ivar and minor style conformance.rsesek@chromium.org2011-03-211-2/+0
| | | | | | | | | BUG=73011 TEST=none Review URL: http://codereview.chromium.org/6718002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78911 0039d316-1c4b-4281-b951-d872f2087c98
* Move base/cocoa_protocols_mac.h to base/mac/cocoa_protocols.hbrettw@chromium.org2010-12-231-1/+1
| | | | | | | | | | Fix users of this file to use the new location. TEST=it compiles BUG=none Review URL: http://codereview.chromium.org/6019004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70009 0039d316-1c4b-4281-b951-d872f2087c98
* Fix compile with 10.6 SDKjrg@chromium.org2010-11-051-1/+3
| | | | | | Review URL: http://codereview.chromium.org/4521001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65159 0039d316-1c4b-4281-b951-d872f2087c98
* Delete obviously unneeded forward declarations in chrome/browser/*.h.viettrungluu@chromium.org2010-08-051-2/+1
| | | | | | | | | BUG=none TEST=builds Review URL: http://codereview.chromium.org/3080031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55037 0039d316-1c4b-4281-b951-d872f2087c98
* Mac: Add "Show Tab Overview" menu item.thakis@chromium.org2010-07-271-0/+3
| | | | | | | | | | | | xib changes: Add menu item with shortcut cmd-f10 for now, connect it to -commandDispatch:. Connect app controller's new outlet to the new menu item. BUG=50307 TEST=No changes by default. If --enable-expose-for-tabs is passed, a new menu item should be visible below "prev tab" in the window menu. It should be active for normal browser windows and fullscreen windows, but not if there are no browser windows around or if the current window is a popup window or a non-browser window (e.g. prefs). Clicking the menu item doesn't do anything yet. cmd-f10 should trigger the menu item, but it shouldn't if the cmdline flag isn't passed. TEST2=Go to a page that is busy spinning some javascript (e.g. "javascript:while(1);"), give it focus, hit cmd-f10. Menu should blink immediately. Review URL: http://codereview.chromium.org/3020035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53833 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
* [Mac] Disable menu certain menu items when a modal dialog or sheet is present.rsesek@chromium.org2010-06-041-0/+6
| | | | | | | | | BUG=28755,41818 TEST=Chromium-->Clear Browsing Data. Cannot open NTP. Cannot open bookmark manager. Cannot open history. Review URL: http://codereview.chromium.org/2605006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48964 0039d316-1c4b-4281-b951-d872f2087c98
* Mac: reform our shutdown routine.viettrungluu@chromium.org2010-04-091-0/+7
| | | | | | | | | | | | | | | | Make shutdown be more like other platforms. Moreover: - Cancelling quit from an onbeforeunload dialog shouldn't mess up the browser. - Having quit cancelled due to a window pop up on the closure of another window shouldn't break the browser. [With this patch, it will result in the browser being in a quirky state in which the closure of the last browser window will cause a quit. But the browser won't be broken.] BUG=34384,37813,37927 TEST=See bugs. Review URL: http://codereview.chromium.org/1520006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44096 0039d316-1c4b-4281-b951-d872f2087c98
* Mac: when only minimized windows present, various commands should unminimize ...viettrungluu@chromium.org2010-02-211-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | ... and use an existing window rather than create a new one. Also, when a dialog box (e.g., Preferences, Bookmark Manager, etc.) is active, those commands should activate an existing window (if one exists) instead of always creating a new window. The complete list of commands which should activate a miniaturized window if possible (otherwise create a new window): - File->New Tab (Cmd-T) - File->Open Location... (Cmd-L) - Edit->Find->Search the Web... (Opt-Cmd-F) - History->History (Cmd-Y) - Window->Downloads (Shift-Cmd-J) - Window->Extensions - Help->Chromium/Google Chrome Help For now, I'm letting File->Open File... (Cmd-O) always create a new window, which is consistent with Safari. BUG=21434 TEST=Close all windows; try one of the commands above (in commit message/CL description); a new window should be created and the command should work; this is all as before this CL. Create a window (if necessary) and minimize all browser windows; try one of the commands above; the last-active browser window should unminimize and the command should execute in that window. Review URL: http://codereview.chromium.org/652018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39566 0039d316-1c4b-4281-b951-d872f2087c98
* Mac: improve situation with respect to launching/DnD local files.viettrungluu@chromium.org2010-01-221-4/+13
| | | | | | | | | | | | | | | | | | This is half the solution, but it should make some stuff work. This should make double-clicking on local HTML files (when Chromium is set as default browser) work more correctly, both when Chromium is already running and when it's not. (The same, but easier to check: dragging a file or files to the Chromium application icon.) You should no longer be told that Chromium can't open HTML files. It's not the full solution since an extraneous (NTP/home page) tab -- or worse -- will be created if Chromium is not already running; solving this will require modifying browser startup. BUG=14808 TEST=Drag a file to the Chromium application icon, both when it's already running and when it's not; file should open in a tab. Do the same, but select multiple files; selected files should open in tabs. Check the same for the Chromium Dock icon (when Chromium is already running). Note that if Chromium is not running, there will be an extraneous (NTP or home page) tab. Review URL: http://codereview.chromium.org/552109 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36902 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 35137 - Getting perf numbers. Will revert.viettrungluu@chromium.org2009-12-221-14/+4
| | | | | | | | | | | | | BUG=none TEST=none TBR=viettrungluu@chromium.org Review URL: http://codereview.chromium.org/502099 TBR=viettrungluu@chromium.org Review URL: http://codereview.chromium.org/504080 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35138 0039d316-1c4b-4281-b951-d872f2087c98
* Getting perf numbers. Will revert.viettrungluu@chromium.org2009-12-221-4/+14
| | | | | | | | | | BUG=none TEST=none TBR=viettrungluu@chromium.org Review URL: http://codereview.chromium.org/502099 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35137 0039d316-1c4b-4281-b951-d872f2087c98
* Mark the help menu as such so Cocoa adds the search item.thomasvl@chromium.org2009-12-011-0/+4
| | | | | | | | BUG=28987 TEST=set lang to french, launch, the help menu should have search option on 10.6 Review URL: http://codereview.chromium.org/452011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33450 0039d316-1c4b-4281-b951-d872f2087c98
* Moved a whole pile of unittests over to CocoaTest.dmaclach@chromium.org2009-11-191-2/+2
| | | | | | | | | | | AboutIPC.xib - Connected up controller to its window and the window delegate to the controller. BUG=26484, 26484 TEST=See repro steps in bugs. Review URL: http://codereview.chromium.org/402066 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32551 0039d316-1c4b-4281-b951-d872f2087c98
* applicationDockMenu: is used in the unit test, it should not be privatemark@chromium.org2009-09-151-0/+3
| | | | | | Review URL: http://codereview.chromium.org/201127 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26294 0039d316-1c4b-4281-b951-d872f2087c98
* Chrome should shut down cleanly when quit from the Dock icon menu, duringmark@chromium.org2009-09-151-1/+2
| | | | | | | | | | | | | | | | | | | | | | user logout, and during system restart and shutdown. MainMenu.xib changes (because you're not expected to parse nibs yourself): - The quit menu item's action is changed from the AppController object's -quit: method (which no longer exists) to the application object's -terminate: method (the Cocoa standard). - The application and owner object types are changed from NSApplication to CrApplication. - The application menu name is changed from Chromium to ^IDS_SHORT_PRODUCT_NAME. Cocoa doesn't use this anyway, it gets replaced at runtime with the localized value of CFBundleName, but we shouldn't have branding-specific strings in our nibs. BUG=18078 TEST=Use Chrome for a while, quit it from the Dock icon menu, and relaunch. You should NOT see the "Google Chrome didn't shut down correctly" info bar. Review URL: http://codereview.chromium.org/201121 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26269 0039d316-1c4b-4281-b951-d872f2087c98
* First cut at Mac history menu.rohitrao@chromium.org2009-07-271-1/+3
| | | | | | | | | | | | | | | | * The menu has two sections: most visited and recently closed. * Creates a HistoryMenuBridge that observes different data sources and stores results for use in the menu. * Creates a HistoryMenuController to respond to Cocoa IBActions from the menu. BUG=14933 TEST=History menu in mac should populate with most visited and recently closed sites. RELEASE_NOTES=Add initial implementation of the Mac history menu. Patch by Robert Sesek. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21639 0039d316-1c4b-4281-b951-d872f2087c98
* Fix issue where cmd-w was hard-coded to closing a browser tab regardless of ↵pinkerton@chromium.org2009-05-271-0/+7
| | | | | | | | | | the frontmost window type. Have cmd-key equiv correctly set depending on the window type and the number of tabs in the window. Broadcast notification when the number of tabs changes in the model. Disable "close tab" item when there's only 1 tab in the browser window. BUG=10047 TEST=cmd-w correctly closes the expected thing (frontmost window, or tab in the frontmost window). close tab should be disabled when the frontmost tab is not a browser or if there is only 1 tab in the window. Review URL: http://codereview.chromium.org/115789 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16981 0039d316-1c4b-4281-b951-d872f2087c98
* About box development.jrg@chromium.org2009-05-201-0/+6
| | | | | | | | | | | BUG=http://codereview.chromium.org/112044 Note pieces of chrome.gyp come from a different CL (keystone_glue work associated with this). Review URL: http://codereview.chromium.org/113614 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16545 0039d316-1c4b-4281-b951-d872f2087c98
* Must register the AE handler earlier to catch the open url on a launch.avi@chromium.org2009-05-191-0/+7
| | | | | | | | BUG=http://crbug.com/11996 Review URL: http://codereview.chromium.org/113543 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16371 0039d316-1c4b-4281-b951-d872f2087c98
* Initial prefs window xib from Cole. Hook the menu up to (empty) code. Use ↵pinkerton@chromium.org2009-04-301-5/+12
| | | | | | | | scoped pointers to manage memory. Review URL: http://codereview.chromium.org/100206 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14945 0039d316-1c4b-4281-b951-d872f2087c98
* Bookmark menu work. Notes:jrg@chromium.org2009-03-251-0/+8
| | | | | | | | | | | | | - "add bookmark" menu item enable state (e.g. disabled if no windows) - bookmark menus built dynamically (like before) - bookmark menus rebuild when a bookmark is added/removed - bookmark menus take the current browser to where you want to go - works with multiple windows (main window goes to bookmark location) - works with no windows (bookmarks open a new window) Review URL: http://codereview.chromium.org/49005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12501 0039d316-1c4b-4281-b951-d872f2087c98
* add basic command handling for browser window and for where there are no ↵pinkerton@google.com2009-01-211-1/+4
| | | | | | | | windows open. Can now create new browser windows. Review URL: http://codereview.chromium.org/18458 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8387 0039d316-1c4b-4281-b951-d872f2087c98
* mac bootstrapping of browser main and app startup bitspinkerton@google.com2009-01-161-0/+21
Review URL: http://codereview.chromium.org/18112 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8185 0039d316-1c4b-4281-b951-d872f2087c98