summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/tabs/tab.h
Commit message (Collapse)AuthorAgeFilesLines
* Remove Menu2Delegate interface and fold methods onto Menu2Model instead.ben@chromium.org2009-06-091-8/+2
| | | | | | | | | | | | | Enhance SimpleMenuModel::Delegate interface to support additional options required by the above. Make MenuHostWindow process WM_MENUCOMMAND and WM_MENUSELECT - the first so we can determine which index was selected, the second so we can track highlight changes within a menu. Convert Tab's context menu back to the windows native menu. This will make my life easier when I upgrade chrome_menu.cc to the new API if only the bookmarks menus/context menus are using it. BUG=none TEST=page, app menus again, context menu for tabs. open a bunch of tabs, open this page: http://bengoodger.dreamhosters.com/software/chrome/cxmenutest.html, close that tab then right click on the menu quickly. should not crash! Review URL: http://codereview.chromium.org/118426 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17996 0039d316-1c4b-4281-b951-d872f2087c98
* Makes chrome_menu able to compile of Linux (the header that is). I'msky@chromium.org2009-05-181-2/+0
| | | | | | | | | | | | going to do some major surgery to chrome_menu to get the rest compiling on linux. BUG=none TEST=none Review URL: http://codereview.chromium.org/115431 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16281 0039d316-1c4b-4281-b951-d872f2087c98
* Handful of changes to get views building again. The tab.cc ifdefs aresky@chromium.org2009-05-151-0/+2
| | | | | | | | | | | | only short term. I'll stub out parts of chrome_menu next so that these can be removed. BUG=none TEST=none Review URL: http://codereview.chromium.org/115406 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16178 0039d316-1c4b-4281-b951-d872f2087c98
* Remove even more ATL dependencies.maruel@chromium.org2009-05-141-1/+1
| | | | | | Review URL: http://codereview.chromium.org/115309 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16088 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 15965. I wasn't supposed to check that in since it still doesn't ↵maruel@chromium.org2009-05-131-1/+1
| | | | | | | | | compile on linux and mac! TBR=sky Review URL: http://codereview.chromium.org/113351 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15967 0039d316-1c4b-4281-b951-d872f2087c98
* Remove even more ATL dependencies.maruel@chromium.org2009-05-131-1/+1
| | | | | | Review URL: http://codereview.chromium.org/115309 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15965 0039d316-1c4b-4281-b951-d872f2087c98
* Removes the use of Windows-specific types for accessibility roles and states ↵klink@chromium.org2009-04-281-1/+1
| | | | | | | | in Views and Browser\Views. Helps with the porting effort, and makes for a cleaner implementation. Review URL: http://codereview.chromium.org/93085 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14689 0039d316-1c4b-4281-b951-d872f2087c98
* Rework the Button API to be saner in preparation for NativeControl ↵ben@chromium.org2009-03-161-5/+3
| | | | | | | | rejiggering.BaseButton->Button, CustomButtonButton->ImageButtonToggleButton->ToggleImageButtonRemoving SetListener (buttons take listener through ctor)Tidy up source files. No functionality changes, just naming and organization.Look at the button classes first, then everything else. Review URL: http://codereview.chromium.org/46096 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11799 0039d316-1c4b-4281-b951-d872f2087c98
* NO CODE CHANGEdeanm@chromium.org2009-03-101-1/+0
| | | | | | | | | Normalize end of file newlines in chrome/. All files end in a single newline. Review URL: http://codereview.chromium.org/42015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11331 0039d316-1c4b-4281-b951-d872f2087c98
* Enable dragging of single tab between two windows.idanan@chromium.org2009-02-201-2/+5
| | | | | | | | | | | To determine if a window is draggable, all that was needed is to call HasAvailableDrag action instead of ContainsExactlyOneTab which was not we wanted anyways. BUG=7861 Review URL: http://codereview.chromium.org/21525 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10068 0039d316-1c4b-4281-b951-d872f2087c98
* Solved 2 bugs which caused Chrome to maximize itself whendouble clicking, ↵idanan@chromium.org2009-02-181-0/+3
| | | | | | | | either on the new tab button, on the closetab button or on a single tab.BUG=2827BUG=3787The problem comes from the Windows event sequence upon adouble-click (simplified here):1 - hit-test2 - mouse-down4 - mouse-up/click5 - hit-test6 - mouse down7 - mouse up/double-clickThe 1st hit-test is always performed correctly, returningclient for tabs and non-client for the tab-strip (background).The 2nd hit test is not performed correctly to avoid crashesin Chromebot from events being processed while tabs are animating.Since we have no record of these crashes, Ben prefers we keepthis special-case, even though we are responding incorrectlyto the windows hit-test. So, when the tabs are animating wereturn a HTNOWHERE hit which the caller translates into anHTCAPTION hit. This even though a tab-control (new-tab/close-tab)may have been hit.The problem is that having returned HTCAPTION to Windows defaultmessage handling, we get a NON-CLIENT double-click event insteadof a standard one.To keep the behavior of the second hit-test AND prevent theChrome window from maximizing, this change simply declaresthe non-client double-click as handled when the tabs areanimating.Another trick we pulled in the hit-test is to return HTCAPTIONwhen a single tab is present. This allows the entire window to be dragged but causes the context menu to be wrong and the windowto maximize when double clicking on the single tab.The solution here is to correct return a client hit for a singletab and, upon handling a client single-click, delegate to thenon-client single-click default handler. Review URL: http://codereview.chromium.org/21268 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9953 0039d316-1c4b-4281-b951-d872f2087c98
* Applying patch for Mohamed Mansour (reviewed by pkasting): ↵finnur@google.com2009-01-061-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | http://codereview.chromium.org/16246 CRASH at Tab::OnMouseReleased Some strange thing is happening that it crashes for view::HitTest, it can never ENTER that function. It seems that the tab is being destroyed and as pkasting stated on IRC: "Part of this may be because our retarded Views designs can't distinguish which buttons are being held versus clicked in these sorts of cases (I filed a bug on this about a year and a half ago, internally)" When a tab has ended dragging (EndDrag), if something was being dragged and you end it, it actually cleans the TabDelegate and assigns its value to 'freed memory' which is 0xfeeefeee. Therefore it crashes while dragging, because the object no longer exists. I couldn't do if (delegate_) cause that always returns true since delegate has 0xfeeefeee. So I just changed the return type from void to bool for underlying EndDragImpl and pumped it to tab.cc. That way, we can know if a tab is destroyed or not. BUG=5819 (http://crbug.com/5819) TEST=Dragging tabs around, closing while dragging, and closing tabs. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7615 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes browser crash that could occur if the user closed a tab with ansky@google.com2008-12-181-0/+10
| | | | | | | | | | | | unload handler, then right clicked on the tab. The fix is to close the menu if the tab closes. BUG=4846 TEST=see bug Review URL: http://codereview.chromium.org/14843 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7235 0039d316-1c4b-4281-b951-d872f2087c98
* Rename ChromeViews namespace to viewsben@chromium.org2008-10-161-13/+12
| | | | | | http://crbug.com/2188 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3495 0039d316-1c4b-4281-b951-d872f2087c98
* Allow Views to support an optional hit-test mask. Make hittest use this.beng@google.com2008-09-161-2/+2
| | | | | | | | | | | Make GetViewForPoint call HitTest instead of rolling its own crude hit testing. Update custom-shaped views to use this framework instead of overriding hittest themselves. B=2273 Review URL: http://codereview.chromium.org/3051 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2255 0039d316-1c4b-4281-b951-d872f2087c98
* Move View components of the Browser's tab strip into the browser_views ↵beng@google.com2008-09-121-0/+125
project, and into the views/ subdirectory on disk. B=2198 Review URL: http://codereview.chromium.org/3020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2140 0039d316-1c4b-4281-b951-d872f2087c98