summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/toolbar_view.cc
Commit message (Collapse)AuthorAgeFilesLines
* Replace lots of "int x, int y" with gfx::Point. Also use gfx::Size and ↵pkasting@chromium.org2010-03-081-5/+3
| | | | | | | | | | gfx::Rect in a few more places. BUG=none TEST=none Review URL: http://codereview.chromium.org/669130 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40966 0039d316-1c4b-4281-b951-d872f2087c98
* Bound page reloading ignoring cache to the following user actions:avayvod@chromium.org2010-02-201-0/+6
| | | | | | | | | | | | | - pressing Ctrl+F5 or Shift+F5 or Ctrl+Shift+R - Shift- or Ctrl-clicking the Reload button. Should work on Windows and Chrome OS (including compact navigation mode). BUG=36244 TEST=Verify that everything works as described above. Review URL: http://codereview.chromium.org/650048 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39543 0039d316-1c4b-4281-b951-d872f2087c98
* Fix bookmark star button theming. Patch by Thiago Farina.mirandac@chromium.org2010-02-191-1/+3
| | | | | | | | | | | BUG= 35028 TEST= Apply a theme. Restart Chrome. Reset to default theme. Bookmark button is correctly returned to default. (see bug report) Review URL: http://codereview.chromium.org/630006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39461 0039d316-1c4b-4281-b951-d872f2087c98
* Move pref_{member,service} and important_file_writer from chrome/commonphajdan.jr@chromium.org2010-02-191-1/+1
| | | | | | | | | | | | | to chrome/browser. This is a part of an effort to remove bad dependency of chrome/common on chrome/browser. TEST=unit_tests and ui_tests, just moving code BUG=none Review URL: http://codereview.chromium.org/621004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39428 0039d316-1c4b-4281-b951-d872f2087c98
* Rebuild app menu in ToolbarView::RunAppMenuxiyuan@chromium.org2010-02-061-0/+2
| | | | | | | | | | | | When "enable-udd-profiles" switch is set, update profile submenu and rebuild app menu if necessary. BUG=30417 TEST=Verify that comment 5 in issue 30417 is fixed. Review URL: http://codereview.chromium.org/571015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38281 0039d316-1c4b-4281-b951-d872f2087c98
* Added Star button to compact navigation mode.avayvod@chromium.org2010-02-051-21/+6
| | | | | | | | | | BUG=32326 TEST=Switch Chrome to compact mode by pressing Ctrl-Shift-C. Test that Star icon works. Review URL: http://codereview.chromium.org/577026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38273 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 38166 - Added Star button to compact navigation mode.pkasting@chromium.org2010-02-051-6/+21
| | | | | | | | | | | | | BUG=32326 TEST=Switch Chrome to compact mode by pressing CtrlShiftC. Test that Star icon works. Review URL: http://codereview.chromium.org/543215 TBR=avayvod@chromium.org Review URL: http://codereview.chromium.org/561081 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38171 0039d316-1c4b-4281-b951-d872f2087c98
* Added Star button to compact navigation mode.avayvod@chromium.org2010-02-051-21/+6
| | | | | | | | | | BUG=32326 TEST=Switch Chrome to compact mode by pressing Ctrl-Shift-C. Test that Star icon works. Review URL: http://codereview.chromium.org/543215 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38166 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor BrowserActionsContainer so that it can be usedoshima@chromium.org2010-02-041-1/+1
| | | | | | | | | | | in other context (CompactLocationBar in chromeos) BUG=32327 TEST=none. no functional change. Review URL: http://codereview.chromium.org/565025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38115 0039d316-1c4b-4281-b951-d872f2087c98
* Insert methods for SimpleMenuModeloshima@chromium.org2010-01-271-4/+8
| | | | | | | | | | | Don't recreate AppMenuModel in ToolbarView as it now supports updating label dynamically. BUG=none TEST=manual: enabling/disabling bookmark sync will update the bookmark sync label correcty. Review URL: http://codereview.chromium.org/551171 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37333 0039d316-1c4b-4281-b951-d872f2087c98
* Resize and overflow for browser actions (part 1).finnur@chromium.org2010-01-221-18/+1
| | | | | | | | | | | | | | | | | | | | | | | | | This changelist implements the following: - A resize gripper and chevron in the browser action container - Overflow when icons don't fit - Snap to multiple of icon size (no excess pixels) - Animation when resizing container / adding&removing icons (disable, enable). - Persists the last width of the browser action container. Known issues: - No menu (yes, the chevron button doesn't do anything yet). BUG=32101 TEST=Install and uninstall browser actions & make sure install bubble appears in the right location. Make sure browser action container does not expand if chevron is showing when you add browser action. Make sure container loses chevron when no overflow occurs. Make sure browser action icons never disappear due to shrinking when you release the mouse (when resizing). Make sure snapping works. Review URL: http://codereview.chromium.org/553039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36905 0039d316-1c4b-4281-b951-d872f2087c98
* Factoring out the layout code from browser_view in preparation to implement ↵oshima@chromium.org2010-01-151-0/+1
| | | | | | | | | | | | | | | | | side bar. (and this will also allow us to clean up browser extender) - BrowserLayoutManager interface with extra layout methods for BrowserView - ChromeLayoutManager implements the same layout policy as of today. - Added new view IDs so that layout manager can identify comoponents added to the BrowserView. BUG=none TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=36276 Review URL: http://codereview.chromium.org/543035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36377 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 36276 - Factoring out the layout code from browser_view in ↵jshin@chromium.org2010-01-141-1/+0
| | | | | | | | | | | | | | | | | | preparation to implement side bar. (and this will also allow us to clean up browser extender) BrowserLayoutManager interface with extra layout methods for BrowserView ChromeLayoutManager implements the same layout policy as of today. Added new view IDs so that layout manager can identify comoponents added to the BrowserView. BUG=none TEST=none Review URL: http://codereview.chromium.org/543035 TBR=oshima@chromium.org Review URL: http://codereview.chromium.org/550050 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36300 0039d316-1c4b-4281-b951-d872f2087c98
* Factoring out the layout code from browser_view in preparation to implement ↵oshima@chromium.org2010-01-141-0/+1
| | | | | | | | | | | | | | | side bar. (and this will also allow us to clean up browser extender) - BrowserLayoutManager interface with extra layout methods for BrowserView - ChromeLayoutManager implements the same layout policy as of today. - Added new view IDs so that layout manager can identify comoponents added to the BrowserView. BUG=none TEST=none Review URL: http://codereview.chromium.org/543035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36276 0039d316-1c4b-4281-b951-d872f2087c98
* Make back forward menu model a MenuModel.estade@chromium.org2009-12-301-4/+4
| | | | | | | | | | | On Linux, implement just enough MenuModel support in GtkMenu. On Linux + windows, remove wrapper classes. On Mac, just change a few function calls around. BUG=none TEST=unit test + manually clicking around on it in debug mode Review URL: http://codereview.chromium.org/501168 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35389 0039d316-1c4b-4281-b951-d872f2087c98
* Make a shared app menu model and update win and mac to use it. Remove the ↵pinkerton@chromium.org2009-12-151-111/+4
| | | | | | | | | | NSMenu from Toolbar.xib. BUG=22646 TEST=the app menu works as it used to. Review URL: http://codereview.chromium.org/482006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34561 0039d316-1c4b-4281-b951-d872f2087c98
* Add a UI helper method to just get the sync status without needing labels.akalin@chromium.org2009-12-141-2/+1
| | | | | | | | | | | Patch by thiago.farina@gmail.com ( original code review: http://codereview.chromium.org/469017 ). BUG=none TEST=trybots Review URL: http://codereview.chromium.org/486044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34487 0039d316-1c4b-4281-b951-d872f2087c98
* Share the code that builds the page menu in a common model, make Mac and Win ↵pinkerton@chromium.org2009-12-091-129/+2
| | | | | | | | | | use it. Implement a mac menu controller that takes this model and generates an NSMenu. Remove the Page Menu NSMenu from Toolbar.xib since it's now created in code. BUG=22646 TEST=page menu should work as before Review URL: http://codereview.chromium.org/465130 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34179 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor the menu model to live outside views/ so it can be sharedpinkerton@chromium.org2009-12-041-9/+10
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/465005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33827 0039d316-1c4b-4281-b951-d872f2087c98
* Implement keyboard access between bookmarks and main toolbar.mhm@chromium.org2009-12-041-245/+4
| | | | | | | | | | | | | | | | Allow ALT+SHIFT+T and TAB to traverse between bookmarks bar and main toolbar, same thing goes for SHIFT+TAB. Once any toolbar is focused, the arrow keys are used to traverse its children views. Any toolbar that needs to be traversable needs to extend "AccessibleToolbarView", that class will deal with all the toolbar accessibility needs such as handling ESC, Left/Right arrows, Enter, Drop downs, and traversals with Tab/Shift+Tab. There is one abstract method that the views who are extending this would need to implement if needed which allows the toolbar to skip views that are being traversed: bool IsAccessibleViewTraversable(views::View* view) BUG=25625 TEST=Test to see if the main toolbar and bookmarks bar is traversable. Review URL: http://codereview.chromium.org/333010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33793 0039d316-1c4b-4281-b951-d872f2087c98
* Changed SyncStatusUIHelper namespace class into a real namespace ↵akalin@chromium.org2009-11-251-4/+4
| | | | | | | | | | | | | | | | | | | (sync_ui_util), per style guide. Changed static functions into anonymous-namespace functions. Renamed files/namespaces from sync_status_ui_helper to sync_ui_util. Moved sync_ui_util_mac.mm functions into sync_ui_util namespace. Updated all callers. BUG=none TEST=trybots Review URL: http://codereview.chromium.org/414065 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33044 0039d316-1c4b-4281-b951-d872f2087c98
* Disables default browser check and exit menu for toolkit_views onsky@chromium.org2009-11-241-2/+5
| | | | | | | | | | | chromeos. BUG=none TEST=none Review URL: http://codereview.chromium.org/431029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32942 0039d316-1c4b-4281-b951-d872f2087c98
* Use plain strings instead of wstrings for UMA actionsevan@chromium.org2009-11-171-1/+1
| | | | | | | | | | | | git grep 'RecordAction(L' | xargs sed -i -e s/RecordAction(L/RecordAction(/ This cuts more than 10k off my binary. Which is nothing compared to the size of the binary, but that's a whole lot of zero bytes! This is less code this way anyway. Review URL: http://codereview.chromium.org/399026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32194 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 32012-32017mhm@chromium.org2009-11-151-4/+245
| | | | | | | | | | | git cl dcommit somehow committed all my local changes in cygwin TBR=evan BUG=none Review URL: http://codereview.chromium.org/396006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32019 0039d316-1c4b-4281-b951-d872f2087c98
* rebasemhm@chromium.org2009-11-151-245/+4
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32012 0039d316-1c4b-4281-b951-d872f2087c98
* Turn on sync for OS X (behind an --enable-sync switch).akalin@chromium.org2009-11-121-1/+2
| | | | | | | | | | | Added ProfileSyncService::IsSyncEnabled(). BUG=23073 TEST=manually (OS X),trybot Review URL: http://codereview.chromium.org/389019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31789 0039d316-1c4b-4281-b951-d872f2087c98
* DevTools: Wire Ctrl+Shift+C to "Show JavaScript console".pfeldman@chromium.org2009-11-061-0/+3
| | | | | | Review URL: http://codereview.chromium.org/377005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31225 0039d316-1c4b-4281-b951-d872f2087c98
* Use the original profile to get the sync service when building the app menu.tim@chromium.org2009-10-301-1/+2
| | | | | | | | | | BUG=23993 TEST=Open incognito window. Click the bookmark sync button. Either the signin dialog or the options panel should open. Review URL: http://codereview.chromium.org/350005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30624 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the browser_sync flag.zork@chromium.org2009-10-271-2/+0
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/337034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30272 0039d316-1c4b-4281-b951-d872f2087c98
* Resubmit http://codereview.chromium.org/314016 with views fixedzork@chromium.org2009-10-261-5/+5
| | | | | | Review URL: http://codereview.chromium.org/338008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30106 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor BrowserActions, and add support foraa@chromium.org2009-10-241-0/+3
| | | | | | | | | | | | | | | | | tab-specific state. Future changelists will move Page Actions over to ExtensionAction2, then replace ExtensionAction and ExtensionActionState with ExtensionAction2. Also, fix a bug in setIcon({path:...}) where it would work only the first time. BUG=24669,24472 Review URL: http://codereview.chromium.org/306044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29997 0039d316-1c4b-4281-b951-d872f2087c98
* Add the Extensinos menu item to GTK.estade@chromium.org2009-10-231-6/+2
| | | | | | | | | | Also change windows so that it always shows the Extensions menu item, but greys it out if it's disabled. BUG=25424 Review URL: http://codereview.chromium.org/316017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29964 0039d316-1c4b-4281-b951-d872f2087c98
* Allow ESC to cancel ALT+SHIFT+T in Toolbar.mhm@chromium.org2009-10-201-9/+51
| | | | | | | | | | | By overriding SkipDefaultKeyEventProcessing in View, it will ensure that the current hackish implementation of Toolbar request focus will be dealt before any other focus related actions and accelerators. BUG=8239 TEST=Press ESC while in accessibility mode. Review URL: http://codereview.chromium.org/272024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29572 0039d316-1c4b-4281-b951-d872f2087c98
* Rename CHROME_PERSONALIZATION to BROWSER_SYNC.nick@chromium.org2009-10-171-1/+1
| | | | | | | | | | Avoid #ifdef in general, favoring #if defined(). In one spot, use PlatformThread::Sleep instead of rolling our own. Review URL: http://codereview.chromium.org/267125 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29360 0039d316-1c4b-4281-b951-d872f2087c98
* Always re-layout the app menu to get sync system state.tim@chromium.org2009-10-161-2/+2
| | | | | | | | | | BUG=25103 TEST=Start chrome, verify app menu says 'Synchronize my bookmarks...'. Click it, and set up sync. Reopen app menu, and it should say 'Bookmarks synced...' Review URL: http://codereview.chromium.org/274078 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29339 0039d316-1c4b-4281-b951-d872f2087c98
* Facelifts to sync UItim@chromium.org2009-10-151-3/+14
| | | | | | | | BUG=23136,24858,21596 TEST=SyncSetupWizardTest Review URL: http://codereview.chromium.org/270081 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29197 0039d316-1c4b-4281-b951-d872f2087c98
* Fix bug: browser action button disappears when loading a new extension. This ↵sidchat@chromium.org2009-10-151-0/+10
| | | | | | | | | | was happenening because BrowserActionContainer, on receiving notification about an extension load/unload/change, deletes all BrowserAction views, re-adds all the views again, and asks the toolbar to SetBounds for the BrowserActionContainer. However, during deletion, it does not re-set the bounds. As a result, when SetBounds is called by the toolbar again, it does not see any changed in BrowserActionContainer, and does not layout again, causing all the browser actions to disappear. The solution lies in forcing Layout() after SetBounds() in ToolbarView. BUG=23593 TEST=none Review URL: http://codereview.chromium.org/276033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29143 0039d316-1c4b-4281-b951-d872f2087c98
* Reland r29095 (removes wrench integration foraa@chromium.org2009-10-151-40/+5
| | | | | | | | | | | | browser actions). Test failure was a fluke. I forgot that changing resources always makes the first bot run fail. TBR=mpcomplete@chromium.org BUG=24379,24671 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29098 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting r29095 (removes wrench integration foraa@chromium.org2009-10-151-5/+40
| | | | | | | | | browser actions). TBR=mpcomplete@chromium.org BUG=24379,24671 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29097 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the implicit wrench menu items for browser actions.aa@chromium.org2009-10-151-40/+5
| | | | | | | | | | | Also, allow browser actions with no initial icons, and add some better tests. BUG=24379,24671 Review URL: http://codereview.chromium.org/276010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29095 0039d316-1c4b-4281-b951-d872f2087c98
* Remove hot tracked toolbar button when toolbar removes focus.mhm@chromium.org2009-10-141-0/+6
| | | | | | | | | | | WillLooseFocus needs to check if acc_focused_view is set, if it is, then it will properly remove it. BUG=3510 TEST=ALT+SHIFT+T all the way to the menu button, select options/about chromium menu option and hit enter to select one of them. The menu will be not hottracked. Review URL: http://codereview.chromium.org/270072 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28938 0039d316-1c4b-4281-b951-d872f2087c98
* Fix flashing issue when hitting escape while find bar is active.mhm@chromium.org2009-10-131-0/+14
| | | | | | | | | | | When the View try's to focus to the last focused component, it can't, because ToolBarView is not Focusable, hence overriding IsFocusable will fix the flashing, but will create a focusable ring around the whole toolbar. BUG=15228 TEST=ALT+SHIFT+T press left arrow until page menu, and select find in page. Press ESC numerous times, no more flashing issues for the find bar. Review URL: http://codereview.chromium.org/265056 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28789 0039d316-1c4b-4281-b951-d872f2087c98
* Converts some uses of native_view to native_window. This is necessitatedsky@chromium.org2009-10-121-6/+5
| | | | | | | | | | | | by wanting to parent bookmarkeditor to browserwindow, which returns a native_window. BUG=none TEST=none Review URL: http://codereview.chromium.org/270067 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28728 0039d316-1c4b-4281-b951-d872f2087c98
* Revert r28645 - "Render sync code inactive..."tim@chromium.org2009-10-101-0/+7
| | | | | | | | Vive le sync! Review URL: http://codereview.chromium.org/269044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28649 0039d316-1c4b-4281-b951-d872f2087c98
* Render sync code inactive without any way to enable.tim@chromium.org2009-10-101-7/+0
| | | | | | | | | | | | **** I WILL REVERT THIS PATCH IMMEDIATELY. It is a kill switch that may need to be merged in later. *** Patching this CL is a quick shut-off mechanism in the event sync needs to de disabled prior to a release build. TEST=No sync UI visible. about:sync shows 'SYNC_DISABLED', no 'Sync Data' folder created when run. Review URL: http://codereview.chromium.org/270049 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28645 0039d316-1c4b-4281-b951-d872f2087c98
* Browser actions: limit minimum size of omnibox. When decreasing the width of ↵sidchat@chromium.org2009-10-091-0/+18
| | | | | | | | | | the omnibox, the Browser actions start falling off one by one till there are two left. After that, the omnibox itself starts shrinking, as it normally does. Note that if there is only one browser action, then it remains sticky to the toolbar. BUG=23962 TEST=none Review URL: http://codereview.chromium.org/262008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28628 0039d316-1c4b-4281-b951-d872f2087c98
* * Add ctrl-shift-d to bookmark all tabs.pkasting@chromium.org2009-10-081-3/+3
| | | | | | | | | | | * Enable or disable bookmark commands based on whether we're actually going to be able to bookmark anything. * Rename IDC_STAR to IDC_BOOKMARK_PAGE, which is more obvious. BUG=2935 TEST=Hit ctrl-shift-d, make sure it bookmarks all tabs Review URL: http://codereview.chromium.org/266029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28480 0039d316-1c4b-4281-b951-d872f2087c98
* Make browser actions appear to the left of the bookmark menu.finnur@chromium.org2009-10-061-4/+4
| | | | | | | | | | | Also fixed min size of the browser to take into account the browser actions. BUG-23924 TESTS=Open Chrome with --bookmark-menu and make sure browser actions you install appear to the left. Also, resize the browser horizontally and make sure it always shows all the controls in the chrome (from Back to App menu). Review URL: http://codereview.chromium.org/246102 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28191 0039d316-1c4b-4281-b951-d872f2087c98
* Don't show popup browser actions in the wrench menu.erikkay@chromium.org2009-10-061-4/+9
| | | | | | | | | BUG=23834 TEST=none Review URL: http://codereview.chromium.org/257048 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28119 0039d316-1c4b-4281-b951-d872f2087c98
* Try again to check in the badge stuff.aa@chromium.org2009-10-031-1/+1
| | | | | | TBR=erikkay@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27925 0039d316-1c4b-4281-b951-d872f2087c98