summaryrefslogtreecommitdiffstats
path: root/views/controls/button
Commit message (Collapse)AuthorAgeFilesLines
* My recent refactoring of TextButton broke the case when the string to displayrogerta@chromium.org2011-05-032-54/+32
| | | | | | | | | | | | | | | | | | | is longer than the available space to display it. In this case, it no longer matters whether the text is to aligned on the left or right, we only need to take into consideration whether the icon is displayed to the left or right in order to make room for it on the correct side. It also broke the case centered buttons with no text string. BUG=81188,81053 TEST=for 81188, create bookmark on the bookmark bar, and edit it to make sure its name is very long. Make sure that the name is clipped correctly and appears with ellipsis. To test 81053, install one or more extensions that have browser actions and make sure the icons appear correctly. Review URL: http://codereview.chromium.org/6901157 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83884 0039d316-1c4b-4281-b951-d872f2087c98
* Implement new gray mock.davemoore@chromium.org2011-05-022-2/+18
| | | | | | | | | BUG=chromium-os:14276 TEST=Login, examine both regular and OTR, and test with and without themes. Review URL: http://codereview.chromium.org/6904160 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83729 0039d316-1c4b-4281-b951-d872f2087c98
* Resubmitting change to fix a build break in the clang builder. A virtualrogerta@chromium.org2011-04-296-188/+784
| | | | | | | | | | | | | | | | | | | | | method in a derived class was not marked as virtual. Resubmitting change to fix a build break in the arm builder. The only change from the original code is in text_button.cc, line 402, where text_x is initialized to 0. Add classes for native themed push buttons, radio buttons, and checkboxes. These controls expose the same public interface and the existing controls of the same type to make it easier to change between the implementations. BUG=None TEST=The new controls should look and feel like native platform controls R=ben@chromium.org Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=83373 Review URL: http://codereview.chromium.org/6853015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83535 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 83373 - Resubmitting change to fix a build break in the arm builder. ↵rogerta@chromium.org2011-04-286-784/+188
| | | | | | | | | The only changefrom the original code is in text_button.cc, line 402, where text_x isinitialized to 0.Add classes for native themed push buttons, radio buttons, and checkboxes.These controls expose the same public interface and the existing controlsof the same type to make it easier to change between the implementations.BUG=NoneTEST=The new controls should look and feel like native platform controlsR=ben@chromium.orgReview URL: http://codereview.chromium.org/6853015 TBR=rogerta@chromium.org Review URL: http://codereview.chromium.org/6902119 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83378 0039d316-1c4b-4281-b951-d872f2087c98
* Resubmitting change to fix a build break in the arm builder. The only changerogerta@chromium.org2011-04-286-188/+784
| | | | | | | | | | | | | | | | | from the original code is in text_button.cc, line 402, where text_x is initialized to 0. Add classes for native themed push buttons, radio buttons, and checkboxes. These controls expose the same public interface and the existing controls of the same type to make it easier to change between the implementations. BUG=None TEST=The new controls should look and feel like native platform controls R=ben@chromium.org Review URL: http://codereview.chromium.org/6853015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83373 0039d316-1c4b-4281-b951-d872f2087c98
* Update all states when wrapper is created.oshima@google.com2011-04-274-15/+18
| | | | | | | | | | | There are a few places that tweaks the order to create button and widgets, which shouldn't be necessary. BUG=none TEST=none Review URL: http://codereview.chromium.org/6874028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83201 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 83110 - Add classes for native themed push buttons, radio buttons, ↵rogerta@chromium.org2011-04-276-772/+188
| | | | | | | | | and checkboxes.These controls expose the same public interface and the existing controlsof the same type to make it easier to change between the implementations.BUG=NoneTEST=The new controls should look and feel like native platform controlsR=ben@chromium.orgReview URL: http://codereview.chromium.org/6853015 TBR=rogerta@chromium.org Review URL: http://codereview.chromium.org/6904040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83111 0039d316-1c4b-4281-b951-d872f2087c98
* Add classes for native themed push buttons, radio buttons, and checkboxes.rogerta@chromium.org2011-04-276-188/+772
| | | | | | | | | | | | | These controls expose the same public interface and the existing controls of the same type to make it easier to change between the implementations. BUG=None TEST=The new controls should look and feel like native platform controls R=ben@chromium.org Review URL: http://codereview.chromium.org/6853015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83110 0039d316-1c4b-4281-b951-d872f2087c98
* Centralizes checking for non-null return from CreateWindow.sky@chromium.org2011-04-191-0/+4
| | | | | | | | | | BUG=none TEST=none R=ben@chromium.org Review URL: http://codereview.chromium.org/6880034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@82137 0039d316-1c4b-4281-b951-d872f2087c98
* Make the usage stats checkbox on EULA screen speak and focus.chaitanyag@chromium.org2011-04-141-0/+1
| | | | | | | | BUG=chromium-os:14128 TEST=Test manually, see issue 14128 Review URL: http://codereview.chromium.org/6852008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81636 0039d316-1c4b-4281-b951-d872f2087c98
* TextButton inside NativeButton for the touch casesaintlou@chromium.org2011-03-319-47/+130
| | | | | | | | | | | | | | | | | | This CL wraps TextButton inside NativeButton for the touch case. The reason for the added intermediate class is that RadioButton is derived from CheckBox which is derived from NativeButton. This is transitional code this approach is simpler and more importantly contained to the views/controls/button/, the rest of the code can continue to use NativeButton transparently as before. BUG=none TEST=none Review URL: http://codereview.chromium.org/6756017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80024 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 79762 - This CL wraps TextButton inside NativeButton for the touch case. dhollowa@chromium.org2011-03-309-133/+47
| | | | | | | | | | | | | | | | | | | | | The reason for the added intermediate class is that RadioButton is derived from CheckBox which is derived from NativeButton. This is just transitional code this approach is simpler and more importantly contained to the views/controls/button/, the rest of the code can continue to use NativeButton transparently as before. Note: the Windows trybot seems to fail on flaky test BUG=none TEST=none Review URL: http://codereview.chromium.org/6770014 TBR=saintlou@chromium.org Review URL: http://codereview.chromium.org/6731075 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79770 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 79768 - Fixed Clang error to http://codereview.chromium.org/6770014/dhollowa@chromium.org2011-03-301-2/+5
| | | | | | | | | | | | | BUG=none TEST=none TBR=sky@chromium.org Review URL: http://codereview.chromium.org/6749046 TBR=dhollowa@chromium.org Review URL: http://codereview.chromium.org/6749047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79769 0039d316-1c4b-4281-b951-d872f2087c98
* Fixed Clang error to http://codereview.chromium.org/6770014/dhollowa@chromium.org2011-03-301-5/+2
| | | | | | | | | | BUG=none TEST=none TBR=sky@chromium.org Review URL: http://codereview.chromium.org/6749046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79768 0039d316-1c4b-4281-b951-d872f2087c98
* This CL wraps TextButton inside NativeButton for the touch case. saintlou@chromium.org2011-03-299-47/+133
| | | | | | | | | | | | | | | | | | The reason for the added intermediate class is that RadioButton is derived from CheckBox which is derived from NativeButton. This is just transitional code this approach is simpler and more importantly contained to the views/controls/button/, the rest of the code can continue to use NativeButton transparently as before. Note: the Windows trybot seems to fail on flaky test BUG=none TEST=none Review URL: http://codereview.chromium.org/6770014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79762 0039d316-1c4b-4281-b951-d872f2087c98
* Disambiguate OnMouseCaptureLost from OnMouseReleased.msw@chromium.org2011-03-2911-35/+47
| | | | | | | | | | | | | Nix RenderWidgetHostViewViews' OnMouseCaptureLost forwarding. Consolidate code, remove unnecessary overrides, etc. Fix up test, |event| args, OVERRIDEs, and (c) dates. BUG=72040 TEST=Views mouse button release, cancelling mouse down/drag. Review URL: http://codereview.chromium.org/6685069 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79640 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes bug where if you click on the bookmark bubble, then change thesky@chromium.org2011-03-172-0/+10
| | | | | | | | | | | | | | | | folder we wouldn't throb the right view. To get this to work I changed the order of when we apply edits (change the model) to before the bubble is closed. Previously we closed the bubble, then applied the edits. We need to apply the edits first as bookmark bar stops throbbing when the bubble is closed. BUG=41082 TEST=see bug R=ben@chromium.org Review URL: http://codereview.chromium.org/6677050 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78585 0039d316-1c4b-4281-b951-d872f2087c98
* Reorder some views::View overrides & other functions.msw@chromium.org2011-03-168-307/+281
| | | | | | | | | | | | | Follow base class ordering and access specifiers. Add OVERRIDE keyword where applicable. Define BaseTab::set_animation_container out of line, update includes. Limit RenderWidgetHostViewViews::OnTouchEvent to TOUCH_UI. Make RenderWidgetHostViewViews::GetCursorForPoint a virtual override. Review URL: http://codereview.chromium.org/6673070 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78416 0039d316-1c4b-4281-b951-d872f2087c98
* Clean up some event code:msw@chromium.org2011-03-148-101/+100
| | | | | | | | | | | Update some RootView event construction. Fixup some *MouseExited/OnLeaveNotify codepaths. Normalize event argument names. Move View::ConvertPoint*Ancestor defs to private section. Review URL: http://codereview.chromium.org/6685018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78121 0039d316-1c4b-4281-b951-d872f2087c98
* Tuned the MouseRelease handler in the Dropdown Button to not un-depress the ↵stevet@google.com2011-03-141-11/+10
| | | | | | | | | | | button when the menu opens (in particular for when the menu is opened by dragging down). Ensured that the button is undepressed every time the menu is closed. Added a couple unit tests to verify this behaviour. Fixed a typo in a test helper. BUG=49240 TEST=Navigate to a couple different web pages so the Back button is enabled. Click on the Back button and immediately drag down. Ensure that when the context menu is show, the back button remains depressed. Ensure that dismissing the context menu always un-depresses the button. Ensure that normal clicking on the buttons still work (navigates forwards or backwards in history). Review URL: http://codereview.chromium.org/6530005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78064 0039d316-1c4b-4281-b951-d872f2087c98
* Re-land: Refactor Views accessibility.dmazzoni@chromium.org2011-03-1414-76/+76
| | | | | | | | | BUG=74988 TEST=none Review URL: http://codereview.chromium.org/6581010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78006 0039d316-1c4b-4281-b951-d872f2087c98
* Update OnMouseActivate override signatures.msw@chromium.org2011-03-091-1/+2
| | | | | | | | | | | | Add OVERRIDE keyword liberally to some relevant overrides. Fix copyright dates. BUG=75366 TEST=Omnibox clicking, etc. Review URL: http://codereview.chromium.org/6648018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77431 0039d316-1c4b-4281-b951-d872f2087c98
* Send accessibility events from GTK implementations of views.dmazzoni@chromium.org2011-03-052-1/+3
| | | | | | | | | BUG=none TEST=manual testing on Chrome OS Review URL: http://codereview.chromium.org/6538090 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77054 0039d316-1c4b-4281-b951-d872f2087c98
* Rename Paint() to PaintForDrag() in two cases.thakis@chromium.org2011-03-054-10/+11
| | | | | | | | | | | | | | | | | | | | | | Both TextButton and MenuItemView called the method that implements their painting Paint(), which is also the name of the superclass's Paint() method. The painting stack currently looks: TextButton::Paint() TextButton::OnPaint() View::Paint() which is confusing. MenuButton overrides the method from TextButton, so rename it there, too. Also convert the 2nd parameter of this function from a bool to an enum. BUG=70465,72205 TEST=none TBR=sky Review URL: http://codereview.chromium.org/6625023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77015 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 76825 - Refactor Views accessibility.jcivelli@chromium.org2011-03-0413-74/+74
| | | | | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/6581010 TBR=dmazzoni@chromium.org Review URL: http://codereview.chromium.org/6612035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76844 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor Views accessibility.dmazzoni@chromium.org2011-03-0313-74/+74
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/6581010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76825 0039d316-1c4b-4281-b951-d872f2087c98
* Add the ability to have shadowed text to the TextButton, in preparation for ↵mirandac@chromium.org2011-03-032-1/+41
| | | | | | | | | | | the multiprofile menu_button. The color of the shadow should also depend on whether the browser frame is active or inactive, so allow for two different shadow colors. BUG=74731 TEST=none Review URL: http://codereview.chromium.org/6597118 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76738 0039d316-1c4b-4281-b951-d872f2087c98
* Rename WillGain/Lose/DidGainFocus, Focus methods. Now there are only two ↵ben@chromium.org2011-02-248-67/+58
| | | | | | | | | | | | | | | | | | | | notifications: OnFocus() OnBlur() View gains a Focus()/Blur() processing method pair. Cleans up code in FocusManager::SetFocusedView. Also adds OVERRIDE to a bunch of methods. BUG=72040 TEST=existing unittests. Review URL: http://codereview.chromium.org/6577010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75830 0039d316-1c4b-4281-b951-d872f2087c98
* Rename Paint* -> OnPaint*ben@chromium.org2011-02-169-17/+17
| | | | | | | | | http://crbug.com/72040 TEST=none TBR=sky Review URL: http://codereview.chromium.org/6499030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75033 0039d316-1c4b-4281-b951-d872f2087c98
* Adds the ability to construct a KeyEvent from a NativeEvent[2], and converts ↵ben@chromium.org2011-02-111-1/+1
| | | | | | | | | | | | | some code to use it. Removes some of the Windows-specific stuff from KeyEvent. BUG=72040 TEST=none Review URL: http://codereview.chromium.org/6487002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74614 0039d316-1c4b-4281-b951-d872f2087c98
* Migrate Event API methods to Google Style.ben@chromium.org2011-02-105-21/+25
| | | | | | | | | | | | | | Re-landing, moving the bits Mac uses to ui/base/events.h BUG=72040 TEST=none TBR=sky Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=74377 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74408 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 74377 - Migrate Event API methods to Google Style.ben@chromium.org2011-02-094-18/+14
| | | | | | | | | | | | BUG=72040 TEST=none Review URL: http://codereview.chromium.org/6480001 TBR=ben@chromium.org Review URL: http://codereview.chromium.org/6469014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74379 0039d316-1c4b-4281-b951-d872f2087c98
* Migrate Event API methods to Google Style.ben@chromium.org2011-02-094-14/+18
| | | | | | | | | BUG=72040 TEST=none Review URL: http://codereview.chromium.org/6480001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74377 0039d316-1c4b-4281-b951-d872f2087c98
* Move Event files into views/eventsben@chromium.org2011-02-092-2/+2
| | | | | | | | | | BUG=none TEST=none TBR=sky Review URL: http://codereview.chromium.org/6459024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74305 0039d316-1c4b-4281-b951-d872f2087c98
* Rework tree APIs to reflect Google style and more const-correctness.Also, ↵ben@chromium.org2011-02-092-7/+7
| | | | | | | | | | | move PrintViewHierarchy/PrintFocusHierarchy out into a separate header. BUG=72040 TEST=None Review URL: http://codereview.chromium.org/6452011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74244 0039d316-1c4b-4281-b951-d872f2087c98
* It turns out I had the sense of the GetLocalBounds bool wrong everywhere, so ↵ben@chromium.org2011-02-093-3/+3
| | | | | | | | | | | | | | invert everything. This fixes the painting bugs in the omnibox and bookmark bar, and probably countless other glitches in rendering. BUG=none TEST=omnibox popup should render properly TBR=sky Review URL: http://codereview.chromium.org/6462022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74231 0039d316-1c4b-4281-b951-d872f2087c98
* Clean up RTL methods.ben@chromium.org2011-02-082-3/+3
| | | | | | | | | | | | | | No one used the non-RTL version of GetBounds(), so I renamed it GetMirroredBounds() and got rid of the enum. Same for GetX(), consolidated with MirroredX() into GetMirroredX(). GetPosition() already took into account mirroring, so renamed GetMirroredPosition() for symmetry. Renamed the other functions to be getters. De-inlined a few that were doing complex looking stuff. http://crbug.com/72040 TEST=none Review URL: http://codereview.chromium.org/6334152 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74087 0039d316-1c4b-4281-b951-d872f2087c98
* Rework basic bounds methods on View to match new V2 API: ben@chromium.org2011-02-083-3/+3
| | | | | | | | | | | | | | | | SetBounds(const gfx::Rect& rect) -> SetBoundsRect(); DidChangeBounds()->OnBoundsChanged() GetLocalBounds(false)->GetLocalBounds() GetLocalBounds(true)->GetContentsBounds() Moved GetBounds(), GetX(), and GetPosition into RTL section. http://crbug.com/72040 TEST=none Review URL: http://codereview.chromium.org/6410109 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74052 0039d316-1c4b-4281-b951-d872f2087c98
* Change includes of gfx/* to ui/gfx/*sail@chromium.org2011-02-059-10/+10
| | | | | | | | | BUG=71063 TEST=compiled Review URL: http://codereview.chromium.org/6312156 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73890 0039d316-1c4b-4281-b951-d872f2087c98
* Move l10n_util to ui/baseben@chromium.org2011-01-212-2/+2
| | | | | | | | | BUG=none TEST=none TBR=brettw git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72227 0039d316-1c4b-4281-b951-d872f2087c98
* Move ResourceBundle, DataPack to ui/baseben@chromium.org2011-01-202-2/+2
| | | | | | | | | | BUG=none TEST=none TBR=brettw Review URL: http://codereview.chromium.org/6263008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72038 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
* Move more dnd related files to ui/baseben@chromium.org2011-01-191-3/+3
| | | | | | | | | | BUG=none TEST=none TBR=brettw Review URL: http://codereview.chromium.org/6250014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71828 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes bug where if preferred size of button was asked for while theresky@chromium.org2011-01-181-1/+1
| | | | | | | | | | | was no native view we would cache the wrong size leading to clipping. BUG=51007 TEST=see bug for repro steps (specifically comment 6). Review URL: http://codereview.chromium.org/6268004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71675 0039d316-1c4b-4281-b951-d872f2087c98
* Remove wstring from views. Part 3: Switch accessibility strings to string16.avi@chromium.org2011-01-149-18/+19
| | | | | | | | | BUG=68267 TEST=no visible changes; all tests pass Review URL: http://codereview.chromium.org/6192007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71461 0039d316-1c4b-4281-b951-d872f2087c98
* Move models from app to ui/base/modelsben@chromium.org2011-01-142-3/+3
| | | | | | | | | BUG=none TEST=none TBR=brettw git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71446 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup: Remove SetAppearsAsDefault() since it is no longer called ↵pkasting@chromium.org2011-01-132-14/+5
| | | | | | | | | | externally. Inline its functionality into the lone internal caller. BUG=none TEST=none Review URL: http://codereview.chromium.org/6133011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71333 0039d316-1c4b-4281-b951-d872f2087c98
* Move app/key* to ui/base/keycodes/*ben@chromium.org2011-01-133-11/+11
| | | | | | | | | | BUG=none TEST=none TBR=brettw Review URL: http://codereview.chromium.org/6246001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71330 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 71169 - Revert 71167 - Remove wstring from gfx.avi@chromium.org2011-01-121-3/+3
| | | | | | | | | | | | | | | BUG=68882 TEST=no visible changes; all tests pass Review URL: http://codereview.chromium.org/6121004 TBR=avi@chromium.org Review URL: http://codereview.chromium.org/6134010 TBR=joi@chromium.org Review URL: http://codereview.chromium.org/6130008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71176 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 71167 - Remove wstring from gfx.joi@chromium.org2011-01-121-3/+3
| | | | | | | | | | | | BUG=68882 TEST=no visible changes; all tests pass Review URL: http://codereview.chromium.org/6121004 TBR=avi@chromium.org Review URL: http://codereview.chromium.org/6134010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71169 0039d316-1c4b-4281-b951-d872f2087c98