summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui/cocoa/browser_window_controller.h
Commit message (Collapse)AuthorAgeFilesLines
* Change grow box computation back to a method on BrowserWindowthakis@chromium.org2012-01-231-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | This is a revert of http://codereview.chromium.org/3547008, which was added to implement sidebars. aa has reverted most of the sidebar code ( http://codereview.chromium.org/9006027/ ), so this is no longer needed. This not only makes the code simpler (look at all the red), but also fixes a long-standing regression on Mac that was caused by the CL this reverts. Parts of the windows part with help form sky@. This does not add back the code in rwhv_win that was added by mad@ for bug 458, since it has since then bitrotted, and it's not used anyway. If someone wants to attack 458 again, http://codereview.chromium.org/16488/diff/1101/chrome/browser/renderer_host/render_widget_host_view_win.cc should be fairly easy to add back. BUG=458,70482,107646 TEST=Not too much stuff breaks; resize box looks good again on 10.5/10.6 TBR=avi Review URL: http://codereview.chromium.org/9265018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118700 0039d316-1c4b-4281-b951-d872f2087c98
* Better fix for Lion dictionary popover cmd-W bug.asvitkine@chromium.org2012-01-181-3/+0
| | | | | | | | | | | | | | | | | | 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
* Rip Out the Sidebar APIrdevlin.cronin@chromium.org2012-01-091-6/+0
| | | | | | | | | | | This fix removes the sidebar api and all its references from the code (primarily relating to chrome/common/extensions and chrome/browser/ui). BUG=107646 TEST=Covered by existing tests. Review URL: http://codereview.chromium.org/9006027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116901 0039d316-1c4b-4281-b951-d872f2087c98
* Remove some more tab_contents.h includes from Chrome.jam@chromium.org2012-01-051-2/+6
| | | | | | | BUG=98716 Review URL: http://codereview.chromium.org/9030035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116422 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
* Replace most of Browser::GetSelectedTabContents calls into ↵jam@chromium.org2012-01-031-1/+1
| | | | | | | | | | | | Browser::GetSelectedWebContents. I've converted the easy ones, I'll do the ones with more dependencies in a separate change to keep things trivial to review. I considered taking out GetSelectedTabContents altogether and having people just use GetSelectedTabContentsWrapper()->web_contents() per the existing comment in browser.h, but there are a lot of callers and it seemed too long to type. BUG=98716 TBR=joi Review URL: http://codereview.chromium.org/9015022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116122 0039d316-1c4b-4281-b951-d872f2087c98
* TBR=jampfeldman@chromium.org2011-12-291-0/+3
| | | | | | | | John: I've added a method and a message in the devtools subsystem. Review URL: http://codereview.chromium.org/9008043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@115967 0039d316-1c4b-4281-b951-d872f2087c98
* This is to prevent a DCHECK in Browser::IsFullscreenForTab from tripping on ↵jeremya@chromium.org2011-11-081-0/+4
| | | | | | | | | | | | | | | | | | | | | | | Lion. In Lion, [BrowserWindowController windowWillEnterFullScreen] calls [BrowserWindowController layoutSubviews], which causes a RenderWidgetHost::WasResized() to be called, which calls Browser::IsFullscreenForTab. Browser::IsFullScreenForTab asserts that, if it is going to return true, the BrowserWindow ought to be fullscreen: DCHECK(!result || window_->IsFullscreen()) In the middle of [BrowserWindowController windowWillEnterFullScreen], however, [BrowserWindowController isFullscreen] still returns NO, so the DCHECK fails. BUG=102458 TEST=none Review URL: http://codereview.chromium.org/8438030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108953 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a crash in FullscreenExitBubbleController when the user clicks the "Exit ↵jeremya@chromium.org2011-10-291-0/+3
| | | | | | | | | | | | | | full screen" button. The crash was due to the fact that Browser::OnDenyFullscreenPermission causes BrowserWindow::ExitFullscreen to be called, which causes the FullscreenExitBubbleController to be destroyed. [FullscreenExitBubbleController deny:] was sending a -hideSoon message to its zombie self following the call to Browser::OnDenyFullscreenPermission. BUG=101835 TEST=The browser doesn't crash when you click "Exit full screen" on a fullscreened page. Review URL: http://codereview.chromium.org/8399017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107841 0039d316-1c4b-4281-b951-d872f2087c98
* Add shortcut to show avatar menusail@chromium.org2011-10-251-0/+3
| | | | | | | | | | | | Shortcut on Views and GTK is Control-Shift-M. Shortcut on Mac is Command-Shift-M. BUG=75782 TEST= Review URL: http://codereview.chromium.org/8356028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107226 0039d316-1c4b-4281-b951-d872f2087c98
* mac: Fix tab fullscreen animation on Lion.thakis@chromium.org2011-10-181-0/+6
| | | | | | | | | | | | | | | | Lion gets confused when a child window is added to a window that's about to go fullscreen. As a workaround, delay creating the fullscreen bubble until the fullscreen animation is completed. Patch co-authored by Jeremy Apthorp <jeremya@chromium.org> BUG=100472 TEST=none Review URL: http://codereview.chromium.org/8320015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105972 0039d316-1c4b-4281-b951-d872f2087c98
* Delete some unused code found by the clang static analyzer.thakis@chromium.org2011-10-171-6/+0
| | | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/8313008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105913 0039d316-1c4b-4281-b951-d872f2087c98
* mac: Plumb fullscreen exit bubble type through to the UI.thakis@chromium.org2011-10-171-6/+11
| | | | | | | | | | | The actual UI implementation will happen in a follow-up change. BUG=100578 TEST=no visible changes Review URL: http://codereview.chromium.org/8321011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105901 0039d316-1c4b-4281-b951-d872f2087c98
* Implement fullscreen info bubble on Win and Mac.jeremya@chromium.org2011-10-151-2/+6
| | | | | | | | | | | | | | | | When a site enters fullscreen a bubble should appear, both to give the user the option to exit fullscreen and to inform them that the site has entered fullscreen. This patch implements that behaviour on Windows and Mac. XIB changes: (FullScreenExitBubble.xib) * Added explanatory text field. * Added "allow" and "deny" buttons. * Changed from View into Window. BUG=73923 TEST= Review URL: http://codereview.chromium.org/7740044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105649 0039d316-1c4b-4281-b951-d872f2087c98
* [Mac] Properly show and hide the avatar button for the one-profile case.rsesek@chromium.org2011-10-071-5/+5
| | | | | | | | | | | | | | | This change makes AvatarButton a view controller that is always instantiated by the BrowserWindowController, and whose view is selectively hidden. BUG=99309 TEST=As in bug. Originally Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=104380 Reverted: http://src.chromium.org/viewvc/chrome?view=rev&revision=104389 Review URL: http://codereview.chromium.org/8172011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104490 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 104380 - [Mac] Properly show and hide the avatar button for the ↵tim@chromium.org2011-10-061-5/+5
| | | | | | | | | | | | | | | | | | one-profile case. This change makes AvatarButton a view controller that is always instantiated by the BrowserWindowController, and whose view is selectively hidden. BUG=99309 TEST=As in bug. Review URL: http://codereview.chromium.org/8172011 TBR=rsesek@chromium.org Review URL: http://codereview.chromium.org/8176019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104389 0039d316-1c4b-4281-b951-d872f2087c98
* [Mac] Properly show and hide the avatar button for the one-profile case.rsesek@chromium.org2011-10-061-5/+5
| | | | | | | | | | | | | This change makes AvatarButton a view controller that is always instantiated by the BrowserWindowController, and whose view is selectively hidden. BUG=99309 TEST=As in bug. Review URL: http://codereview.chromium.org/8172011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104380 0039d316-1c4b-4281-b951-d872f2087c98
* [Mac] Remove vertical/side tabs.rsesek@chromium.org2011-10-051-5/+0
| | | | | | | | | | BUG=44773 TEST=none Review URL: http://codereview.chromium.org/8143023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104162 0039d316-1c4b-4281-b951-d872f2087c98
* Implement a bubble that appears at the top of the screen when a tab enters jeremya@chromium.org2011-09-171-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fullscreen mode via webkitRequestFullScreen(), telling the user how to exit fullscreen. This is implemented as an NSView rather than an NSWindow because the floating chrome that appears in presentation mode should overlap the bubble. Content-initiated fullscreen mode makes use of 'presentation mode' on the Mac: the mode in which the UI is hidden, accessible by moving the cursor to the top of the screen. On Snow Leopard, this mode is synonymous with fullscreen mode. On Lion, however, fullscreen mode does not imply presentation mode: in non-presentation fullscreen mode, the chrome is permanently shown. It is possible to switch between presentation mode and fullscreen mode using the presentation mode UI control. When a tab initiates fullscreen mode on Lion, we enter presentation mode if not in presentation mode already. When the user exits fullscreen mode using Chrome UI (i.e. keyboard shortcuts, menu items, buttons, switching tabs, etc.) we return the user to the mode they were in before the tab entered fullscreen. BUG=14471 TEST=Enter fullscreen mode using webkitRequestFullScreen. You should see a bubble pop down from the top of the screen. Need to test the Lion logic somehow, with no Lion trybots. BUG=96883 Original review http://codereview.chromium.org/7890056/ TBR=thakis Review URL: http://codereview.chromium.org/7920024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@101624 0039d316-1c4b-4281-b951-d872f2087c98
* Fullscreen support for Lion.rohitrao@chromium.org2011-08-041-18/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | XIB changes: - Add new "Enter Presentation Mode" menu item with Cmd-Shift-F. - Change key equivalent for "Enter Full Screen" to Cmd-Opt-F. On Lion: This CL separates the concepts of "fullscreen mode" and "presentation mode." Fullscreen mode uses Lion's fullscreen mode and places the window in its own space. Presentation mode is an extra option to additionally hide the UI when in fullscreen mode. On Lion, clicking on the fullscreen button takes you into fullscreen mode, in which there is a button to toggle presentation mode on or off. While in normal windowed mode, there are two menu options to either "Enter Full Screen" or "Enter Presentation Mode" directly. On Snow Leopard: This CL does not change much on Snow Leopard. To maintain consistency with the new Lion terminology, the "Enter Full Screen" menu item has been renamed to "Enter Presentation Mode." BUG=74065 TEST=Fullscreen works in Lion. Fullscreen continues to work as before in Snow Leopard. Review URL: http://codereview.chromium.org/7566016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95518 0039d316-1c4b-4281-b951-d872f2087c98
* [Mac] Add two-finger gesture support for Lion, which respects the system ↵rsesek@chromium.org2011-07-221-1/+6
| | | | | | | | | | | preference. BUG=78676 TEST=With two-finger gestures enabled, swipe left/right with two fingers. Page goes back/forward. Review URL: http://codereview.chromium.org/7488023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93720 0039d316-1c4b-4281-b951-d872f2087c98
* [Mac] Put the multi-profile avatar in the window frame.rsesek@chromium.org2011-06-291-10/+14
| | | | | | | | | | BUG=60105 TEST=With --multi-profiles, see the avatar and clicking it opens a menu. Incognito guy doesn't open the menu. Review URL: http://codereview.chromium.org/7277062 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91017 0039d316-1c4b-4281-b951-d872f2087c98
* [Mac] Revert unspoofable infobars v2.rsesek@chromium.org2011-06-211-3/+0
| | | | | | | | | | | | | The implementation is buggy and my head hurts from banging it against my desk for weeks on end. This commit reverts r89508, r89530, and r89659. BUG=76381 TEST=Allays ibf. http://cl.ly/0G301B1b0o1F3P2V3K3x Review URL: http://codereview.chromium.org/7200042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89777 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/+3
| | | | | | | | | | | | 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
* [Mac] Unspoofable infobars v2.rsesek@chromium.org2011-06-171-0/+3
| | | | | | | | | | | | | This adds a new ObjC model to help infobars draw. This is owned by the InfobarContainerController and produces an infobars::Tip that contains all the information an InfobarGradientView needs to draw. BUG=76381 TEST=visual Review URL: http://codereview.chromium.org/7150013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89508 0039d316-1c4b-4281-b951-d872f2087c98
* Enforce different min size for popups than tabbed browsers on MacOSX.jennb@chromium.org2011-06-091-0/+4
| | | | | | | | | | | xib changes: Removed browser window minSize and minContentSize from xib file. Instead, set the min size programmatically in BrowserWindowController::awakeFromNib in order to customize the min size depending on the browser type. BUG=83985 TEST=BrowserWindowControllerTest.TestSetBounds and TestSetBoundsPopup Review URL: http://codereview.chromium.org/7003063 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88588 0039d316-1c4b-4281-b951-d872f2087c98
* Browser::Type cleanup.jianli@chromium.org2011-05-051-2/+2
| | | | | | | | | | BUG=None TEST=Existing tests R=ben@chromium.org,stevenjb@chromium.org,phajdan.jr@chromium.org Review URL: http://codereview.chromium.org/6697032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84303 0039d316-1c4b-4281-b951-d872f2087c98
* Commit Instant if needed before handling a web page context menu.maf@chromium.org2011-04-161-0/+1
| | | | | | | | Avoids the situation where contextual menu commands like "Open Link in New Tab" get ignored, because it's being handled with the Instant dummy loader still in place. BUG=73259 Review URL: http://codereview.chromium.org/6874030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81886 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
* Add Lion button, wire it up to enter our full-screen.avi@chromium.org2011-03-211-1/+4
| | | | | | | | | BUG=74056 TEST=On Lion, hit the new full-screen button Review URL: http://codereview.chromium.org/6715003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78918 0039d316-1c4b-4281-b951-d872f2087c98
* [Mac] Fix cut-off Browser chrome when opening Tabpose with an infobar showing.rsesek@chromium.org2011-02-181-0/+3
| | | | | | | | | BUG=73357 TEST=Get an infobar to show. Open Tab Overview/Tabpose. Everything looks correct. Review URL: http://codereview.chromium.org/6543012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75429 0039d316-1c4b-4281-b951-d872f2087c98
* [Mac] Organize some files into chrome/browser/ui/cocoa/tab_contents/.rsesek@chromium.org2011-01-241-1/+1
| | | | | | | | | BUG=none TEST=compiles R=pinkerton Review URL: http://codereview.chromium.org/6358008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72345 0039d316-1c4b-4281-b951-d872f2087c98
* Move a bunch of random other files to src/ui/baseben@chromium.org2011-01-201-1/+1
| | | | | | | | | | BUG=none TEST=none TBR=brettw Review URL: http://codereview.chromium.org/6257006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71970 0039d316-1c4b-4281-b951-d872f2087c98
* [Mac] Organize all tab/tab strip files into chrome/browser/ui/cocoa/tabs/.rsesek@chromium.org2011-01-191-2/+2
| | | | | | | | BUG=none TEST=compiles Review URL: http://codereview.chromium.org/6362007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71827 0039d316-1c4b-4281-b951-d872f2087c98
* Move browser/cocoa to browser/ui/cocoaben@chromium.org2010-12-011-0/+397
BUG=none TEST=none TBR=brettw git-svn-id: svn://svn.chromium.org/chrome/trunk/src@67854 0039d316-1c4b-4281-b951-d872f2087c98