summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/tabs/tab.cc
Commit message (Collapse)AuthorAgeFilesLines
* Fix compile bustage by using macroben@chromium.org2009-06-101-1/+2
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18000 0039d316-1c4b-4281-b951-d872f2087c98
* Remove Menu2Delegate interface and fold methods onto Menu2Model instead.ben@chromium.org2009-06-091-90/+62
| | | | | | | | | | | | | 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
* Removes ifdef around include of tooltip_manager now that it's beensky@chromium.org2009-05-281-2/+0
| | | | | | | | | | | | ported. BUG=none TEST=none TBR=brettw Review URL: http://codereview.chromium.org/113963 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17101 0039d316-1c4b-4281-b951-d872f2087c98
* Splits TooltipManager so that it can be ported and stubs out the GTKsky@chromium.org2009-05-281-2/+0
| | | | | | | | | | | side. BUG=none TEST=none Review URL: http://codereview.chromium.org/114054 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17076 0039d316-1c4b-4281-b951-d872f2087c98
* Fix erroneous sign when drawing path for right endcap of tabs, causing them ↵pkasting@chromium.org2009-05-271-1/+1
| | | | | | | | to not be selectable for much of the right endcap. Review URL: http://codereview.chromium.org/115836 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17038 0039d316-1c4b-4281-b951-d872f2087c98
* Makes chrome_menu able to compile of Linux (the header that is). I'msky@chromium.org2009-05-181-15/+3
| | | | | | | | | | | | 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-2/+19
| | | | | | | | | | | | 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
* ChromeCanvas->gfx::Canvasben@chromium.org2009-05-151-1/+1
| | | | | | | | | | | Rename files too. TBR=brettw http://crbug.com/11387 Review URL: http://codereview.chromium.org/113443 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16148 0039d316-1c4b-4281-b951-d872f2087c98
* ChromeFont->gfx::Fontbeng@google.com2009-05-151-2/+2
| | | | | | | | | | Does not rename the files yet. http://crbug.com/11387 Review URL: http://codereview.chromium.org/113441 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16141 0039d316-1c4b-4281-b951-d872f2087c98
* Remove even more ATL dependencies.maruel@chromium.org2009-05-141-3/+3
| | | | | | 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-3/+3
| | | | | | | | | 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-3/+3
| | | | | | Review URL: http://codereview.chromium.org/115309 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15965 0039d316-1c4b-4281-b951-d872f2087c98
* Move src/chrome/views to src/views. RS=darin http://crbug.com/11387ben@chromium.org2009-05-081-3/+3
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15604 0039d316-1c4b-4281-b951-d872f2087c98
* Move: drag_drop_types, favicon_size, icon_util, insets, path, ↵ben@chromium.org2009-05-061-1/+1
| | | | | | | | | message_box_flags, os_exchange_data to src/app http://crbug.com/11387 Review URL: http://codereview.chromium.org/115012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15371 0039d316-1c4b-4281-b951-d872f2087c98
* Move chrome_canvas to app/gfxben@chromium.org2009-05-061-1/+1
| | | | | | | | http://crbug.com/11387 Review URL: http://codereview.chromium.org/113011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15361 0039d316-1c4b-4281-b951-d872f2087c98
* Move l10n_util to app/ben@chromium.org2009-05-051-1/+1
| | | | | | | http://crbug.com/11387 Review URL: http://codereview.chromium.org/109043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15352 0039d316-1c4b-4281-b951-d872f2087c98
* Adds toplevel app/ directory and moves ResourceBundle into it.ben@chromium.org2009-05-051-1/+1
| | | | | | | | | | | No changes to resource bundle yet, just the move to keep this CL as compact as possible. Adds new vcproj and gyp file for app dir. http://crbug.com/11387 Review URL: http://codereview.chromium.org/100354 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15264 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes bug in dragging tabs. Specifically if you only have one windowsky@chromium.org2009-04-291-1/+1
| | | | | | | | | | | | | | | with one tab, drag the tab, and while dragging click and release the right mouse button we get all confused. This is because we get two OnMousePressed events in a row, which results in cancelling out the current drag which doesn't work well when only one tab with one window is left. BUG=10800 TEST=see bug Review URL: http://codereview.chromium.org/100169 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14870 0039d316-1c4b-4281-b951-d872f2087c98
* Removes the use of Windows-specific types for accessibility roles and states ↵klink@chromium.org2009-04-281-3/+2
| | | | | | | | 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
* This CL fixes issue 5729 - RTL: TabStrip context menu should be positioned ↵xji@chromium.org2009-04-161-1/+4
| | | | | | | | | | | | | properly, If window is not maxmized. (http://crbug.com/5729). The fix is to popup tabstrip context menu from the left of the click in RTL UI. Without the fix, tabstrip context menu always popup from the right of the click. Review URL: http://codereview.chromium.org/73021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13888 0039d316-1c4b-4281-b951-d872f2087c98
* Added undo tab closing item to Tab menu.idanan@chromium.org2009-04-141-0/+2
| | | | | | Review URL: http://codereview.chromium.org/62151 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13662 0039d316-1c4b-4281-b951-d872f2087c98
* Move controls into their own dir under chrome/views/controlsben@chromium.org2009-03-171-1/+1
| | | | | | | | TBR=sky Review URL: http://codereview.chromium.org/48058 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11841 0039d316-1c4b-4281-b951-d872f2087c98
* Move widget related files into views/widgetben@chromium.org2009-03-171-2/+2
| | | | | | | TBR=sky git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11811 0039d316-1c4b-4281-b951-d872f2087c98
* Rework the Button API to be saner in preparation for NativeControl ↵ben@chromium.org2009-03-161-3/+2
| | | | | | | | 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
* Make Widget return a gfx::NativeView instead of a HWND.ben@chromium.org2009-03-121-1/+1
| | | | | | Review URL: http://codereview.chromium.org/43124 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11562 0039d316-1c4b-4281-b951-d872f2087c98
* Make the last tab part of the client area instead of the non-client as it is ↵ben@chromium.org2009-03-091-9/+0
| | | | | | | | | | | | now. Remove some stupid code in the Tab's mouse pressed handler that was duplicating the nc-hittest handler. o_O. http://crbug.com/8519 Review URL: http://codereview.chromium.org/41018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11299 0039d316-1c4b-4281-b951-d872f2087c98
* Update include paths for grit files. Go ahead and resorttc@google.com2009-02-221-1/+1
| | | | | | | | the headers too. Review URL: http://codereview.chromium.org/21472 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10167 0039d316-1c4b-4281-b951-d872f2087c98
* Enable dragging of single tab between two windows.idanan@chromium.org2009-02-201-1/+1
| | | | | | | | | | | 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-1/+10
| | | | | | | | 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-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-12/+42
| | | | | | | | | | | | 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
* Don't close tabs on middle-click when the release happens off the tab. ↵pkasting@chromium.org2008-12-011-1/+5
| | | | | | | | Patch by Mohamed Mansour, r=ben. See http://codereview.chromium.org/12816/ . BUG=1062 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6184 0039d316-1c4b-4281-b951-d872f2087c98
* Rename Container->Widgetben@chromium.org2008-11-211-2/+2
| | | | | | | | | R=erg review url = http://codereview.chromium.org/11348/show git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5849 0039d316-1c4b-4281-b951-d872f2087c98
* Rename ChromeViews namespace to viewsben@chromium.org2008-10-161-16/+15
| | | | | | http://crbug.com/2188 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3495 0039d316-1c4b-4281-b951-d872f2087c98
* Rename ViewContainer to Container and HWNDViewContainer to ContainerWin.ben@chromium.org2008-10-161-4/+3
| | | | | | | http://crbug.com/3430 Review URL: http://codereview.chromium.org/7376 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3441 0039d316-1c4b-4281-b951-d872f2087c98
* Port some more of chrome/ to Linux.deanm@google.com2008-10-021-0/+1
| | | | | | | | Original review: http://codereview.chromium.org/4247 Patch from Pawel Hajdan Jr. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2793 0039d316-1c4b-4281-b951-d872f2087c98
* I'm going to try and land this again. This is exactly the same change as you ↵sky@google.com2008-09-221-1/+1
| | | | | | | | | | | | | | | | reviewed earlier. Fixes mnemonic bug in chrome menus. After this change you can indicate whether menus have mnemonics. Mnemonics are shown if the menus have mnemonics, and the OS says we should show them. BUG=1355952 TEST=add a bookmark and change the title to &foo. Move the bookmark to a folder, click on the folder and make sure the title shows the &. Review URL: http://codereview.chromium.org/4021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2458 0039d316-1c4b-4281-b951-d872f2087c98
* Reverts fix for 2554.sky@google.com2008-09-221-1/+1
| | | | | | Review URL: http://codereview.chromium.org/4017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2445 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes mnemonic bug in chrome menus. After this change you can indicatesky@google.com2008-09-221-1/+1
| | | | | | | | | | | | | whether menus have mnemonics. Mnemonics are shown if the menus have mnemonics, and the OS says we should show them. BUG=1355952 TEST=add a bookmark and change the title to &foo. Move the bookmark to a folder, click on the folder and make sure the title shows the &. Review URL: http://codereview.chromium.org/4002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2442 0039d316-1c4b-4281-b951-d872f2087c98
* Rename legacy methods that were in CamelCase to unix_hacker.erg@google.com2008-09-171-2/+2
| | | | | | | | | Required going through and modifying some of the code to solve name clashes. Review URL: http://codereview.chromium.org/2945 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2337 0039d316-1c4b-4281-b951-d872f2087c98
* Allow Views to support an optional hit-test mask. Make hittest use this.beng@google.com2008-09-161-5/+6
| | | | | | | | | | | 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/+241
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