summaryrefslogtreecommitdiffstats
path: root/views/controls
Commit message (Collapse)AuthorAgeFilesLines
* base/i18n: Put break_iterator* into namespace i18n.tfarina@chromium.org2011-05-161-2/+2
| | | | | | | | | | | BUG=None TEST=None R=brettw@chromium.org Review URL: http://codereview.chromium.org/7034012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85525 0039d316-1c4b-4281-b951-d872f2087c98
* [Views/GTK] also suppress the OnClicked signal when invoked ↵jochen@chromium.org2011-05-162-17/+23
| | | | | | | | | | | | gtk_radio_button_set_group BUG=59872 TEST=as described in the bug Review URL: http://codereview.chromium.org/7011035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85483 0039d316-1c4b-4281-b951-d872f2087c98
* Workaround for menu crash.oshima@google.com2011-05-131-3/+5
| | | | | | | | | | | | | | | I don't fully understand how this can happen because handler should not exist if handler_id is 0. There may be some undocumented behavior in gtk. I couldn't reproduce this on my machine either (but i've seen on tester's machine) so this is hypothetical workaround that should fix this. BUG=chromium-os:15212 TEST=see bug for reprostep Review URL: http://codereview.chromium.org/7013058 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85346 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor Edit to have one Undo/Redooshima@google.com2011-05-135-289/+283
| | | | | | | | | | | Always use Redo() to modify the text. BUG=none TEST=new tests added Review URL: http://codereview.chromium.org/7011025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85344 0039d316-1c4b-4281-b951-d872f2087c98
* This CL increases the menu items size and the spacing between the status icons.saintlou@chromium.org2011-05-131-1/+10
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/7013042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85331 0039d316-1c4b-4281-b951-d872f2087c98
* Add MenuItemView API to add and remove items at a particular index.rhashimoto@chromium.org2011-05-133-41/+90
| | | | | | | | | | | | | The ChromeOS network menu needs to be able to change menu items dynamically. In order to convert this menu from Menu2 to MenuItemView it is cleanest to let MenuItemView own the code to modify the items. BUG=none TEST=included Review URL: http://codereview.chromium.org/6931039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85313 0039d316-1c4b-4281-b951-d872f2087c98
* Re-land:ben@chromium.org2011-05-1316-60/+49
| | | | | | | | | | | | Split the hierarchy. Now with AutocompletePopup implementing SupportsWeakPtr as before. This fixes the Windows XP crashes in browser_tests. BUG=72040 TEST=none Review URL: http://codereview.chromium.org/7015051 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85298 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 85269 - Split the hierarchy. ben@chromium.org2011-05-1316-49/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Widget ---- Now recognizes a supplied NativeWidget via InitParams. If this is specified then a default one is not created. Is now created directly rather than using a factory. NativeWidget creation is not performed until Init() is called. This means some functions that rely on a NativeWidget must not be called until _AFTER_ Init() (explains some of the function call reordering in this CL, e.g. moving SetOpacity() until after Init()). ResetLastMouseMovedFlag() moved to this API so that BaseTabStrip can call it in a cross-platform way. Made last remaining unimplemented methods on Widget pass-thru to NativeWidget implementations. * WidgetWin/WidgetGtk ---- The NativeWidget implementations now both require a NativeWidgetDelegate implementation upon construction. This is passed through the constructor by the static factory method NativeWidget::CreateNativeWidget and by subclasses such as WindowWin, BubbleWidgetWin, etc. Some classes that are constructed directly (e.g. LockWindow, in ChromeOS) never have a Widget created for them, so they create the Widget themselves in their base class initializer. Code in these classes (and their WindowWin/WindowGtk, BrowserFrameWin, BrowserFrameGtk subclasses) must now call GetWidget() etc to call Widget API methods since they are no longer subclasses. static_casting to this (and derived) types must now be done on the Widget's native_widget(). GetWindow() is renamed to GetContainingWindow() to avoid naming conflicts. * Window ---- Window is now a subclass of Widget. Now recognizes a supplied NativeWindow via InitParams. If this is specified then a default one is not created. Window::CloseWindow becomes an override of Widget::Close. CloseAllSecondaryWindows() becomes CloseAllSecondaryWidgets() and moves to widget.h IsAppWindow() is removed and replaced by set_is_secondary_widget on Widget. * MenuHost ---- Subclasses Widget now. * TabContentsViewViews ---- It looks like the Gtk-views code here was still using the old implementation of the Native version of this class - i.e. a class that subclassed TabContentsView AND WidgetGtk. A no-no. I had to write NativeTabContentsViewGtk, which is almost identical to NativeTabContentsViewWin with the Gtk bits of TabContentsViewGtk thrown in. * BrowserFrame ---- Platform-specific functionality is now restricted to BrowserFrameWin/BrowserFrameGtk behind a NativeBrowserFrame interface. Construction is exposed via a static factory method on NativeBrowserFrame. BrowserFrame becomes a concrete class that now subclasses Window. As a result, it no longer needs a GetWindow() accessor method, so people with a BrowserFrame* can just call Window methods directly on it. It is constructed directly, replacing the BrowserFrame::Create() method. NativeBrowserFrameDelegate is no longer needed. BrowserFrameChromeos is simpler as a couple of #ifdefs in BrowserFrame, so I got rid of that too. * AutocompletePopupWin/Gtk ---- No longer required. AutocompletePopupContentsView now just uses a Widget directly. * There is some lingering ugliness: - If you set a native_window field on Window::InitParams you must also manually set widget_init_params.native_widget. I will make InitParams do more of this automatically later. - It'd be nice for the ContentsView to be specified via InitParams. I'll get to this later. - NativeBrowserFrame could probably disappear as an interface. It only exists to provide a couple of methods that may be implemented in other ways. - delete_on_destroy should now be an ownership directionality enum. I will do this later. - Secondary-widgetness should somehow be inferred from transience. Later. - set_focus_on_creation for both the NativeWidgets should probably move to Widget if it is really needed. - WidgetWin/Gtk::SetInitialFocus seems like it could move to Widget. - I need to clean up function order in some cases. BUG=72040 TEST=none Review URL: http://codereview.chromium.org/7012006 TBR=ben@chromium.org Review URL: http://codereview.chromium.org/7011038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85283 0039d316-1c4b-4281-b951-d872f2087c98
* Add views::MenuDelegate call for per-item fonts.rhashimoto@chromium.org2011-05-136-6/+36
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/6969046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85274 0039d316-1c4b-4281-b951-d872f2087c98
* Split the hierarchy. ben@chromium.org2011-05-1316-60/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Widget ---- Now recognizes a supplied NativeWidget via InitParams. If this is specified then a default one is not created. Is now created directly rather than using a factory. NativeWidget creation is not performed until Init() is called. This means some functions that rely on a NativeWidget must not be called until _AFTER_ Init() (explains some of the function call reordering in this CL, e.g. moving SetOpacity() until after Init()). ResetLastMouseMovedFlag() moved to this API so that BaseTabStrip can call it in a cross-platform way. Made last remaining unimplemented methods on Widget pass-thru to NativeWidget implementations. * WidgetWin/WidgetGtk ---- The NativeWidget implementations now both require a NativeWidgetDelegate implementation upon construction. This is passed through the constructor by the static factory method NativeWidget::CreateNativeWidget and by subclasses such as WindowWin, BubbleWidgetWin, etc. Some classes that are constructed directly (e.g. LockWindow, in ChromeOS) never have a Widget created for them, so they create the Widget themselves in their base class initializer. Code in these classes (and their WindowWin/WindowGtk, BrowserFrameWin, BrowserFrameGtk subclasses) must now call GetWidget() etc to call Widget API methods since they are no longer subclasses. static_casting to this (and derived) types must now be done on the Widget's native_widget(). GetWindow() is renamed to GetContainingWindow() to avoid naming conflicts. * Window ---- Window is now a subclass of Widget. Now recognizes a supplied NativeWindow via InitParams. If this is specified then a default one is not created. Window::CloseWindow becomes an override of Widget::Close. CloseAllSecondaryWindows() becomes CloseAllSecondaryWidgets() and moves to widget.h IsAppWindow() is removed and replaced by set_is_secondary_widget on Widget. * MenuHost ---- Subclasses Widget now. * TabContentsViewViews ---- It looks like the Gtk-views code here was still using the old implementation of the Native version of this class - i.e. a class that subclassed TabContentsView AND WidgetGtk. A no-no. I had to write NativeTabContentsViewGtk, which is almost identical to NativeTabContentsViewWin with the Gtk bits of TabContentsViewGtk thrown in. * BrowserFrame ---- Platform-specific functionality is now restricted to BrowserFrameWin/BrowserFrameGtk behind a NativeBrowserFrame interface. Construction is exposed via a static factory method on NativeBrowserFrame. BrowserFrame becomes a concrete class that now subclasses Window. As a result, it no longer needs a GetWindow() accessor method, so people with a BrowserFrame* can just call Window methods directly on it. It is constructed directly, replacing the BrowserFrame::Create() method. NativeBrowserFrameDelegate is no longer needed. BrowserFrameChromeos is simpler as a couple of #ifdefs in BrowserFrame, so I got rid of that too. * AutocompletePopupWin/Gtk ---- No longer required. AutocompletePopupContentsView now just uses a Widget directly. * There is some lingering ugliness: - If you set a native_window field on Window::InitParams you must also manually set widget_init_params.native_widget. I will make InitParams do more of this automatically later. - It'd be nice for the ContentsView to be specified via InitParams. I'll get to this later. - NativeBrowserFrame could probably disappear as an interface. It only exists to provide a couple of methods that may be implemented in other ways. - delete_on_destroy should now be an ownership directionality enum. I will do this later. - Secondary-widgetness should somehow be inferred from transience. Later. - set_focus_on_creation for both the NativeWidgets should probably move to Widget if it is really needed. - WidgetWin/Gtk::SetInitialFocus seems like it could move to Widget. - I need to clean up function order in some cases. BUG=72040 TEST=none Review URL: http://codereview.chromium.org/7012006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85269 0039d316-1c4b-4281-b951-d872f2087c98
* Set minimum width on menu for NativeComboboxViews.rhashimoto@chromium.org2011-05-113-2/+6
| | | | | | | | | | | | | The combobox menu is forced to be at least as wide as the combobox itself. Besides the addition to native_combobox_views.cc, an edit was needed to views::SubmenuView. The minimum preferred width must account for the border (specified in SubmenuView, applied in MenuScrollViewContainer) to make the ultimate menu width match the size requested by the combobox. BUG=none TEST=none Review URL: http://codereview.chromium.org/7002004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85010 0039d316-1c4b-4281-b951-d872f2087c98
* Added Unit Testing for pure Views Comboboxsaintlou@chromium.org2011-05-113-0/+184
| | | | | | | | | BUG=none TEST=out/Debug/views_unittests --gtest_filter=NativeComboboxViewsTest.KeyTest Review URL: http://codereview.chromium.org/6980007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84989 0039d316-1c4b-4281-b951-d872f2087c98
* Undo Redo for Textfield Viewsoshima@google.com2011-05-116-60/+1055
| | | | | | | | | | | | | | | Added Edit and its subclass that represents a change that can be undone/redone. Set TestViewsDelegates in examples_main.cc to make cut&copy work in views_examples. I'll refactor this soon so that text change is always done by an edit object. BUG=none TEST=unit tests for undo/redo Review URL: http://codereview.chromium.org/6937002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84902 0039d316-1c4b-4281-b951-d872f2087c98
* wstring: remove WideToUpper/WideToLowerevan@chromium.org2011-05-105-23/+23
| | | | | | | | | | | Also fix two instances of passing a single-char array to a function that expects a string (we must NUL-terminate the array). BUG=23581 Review URL: http://codereview.chromium.org/7000005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84855 0039d316-1c4b-4281-b951-d872f2087c98
* Fix leak of EmptyMenuMenuItem.rhashimoto@chromium.org2011-05-101-0/+2
| | | | | | | | | | | RemoveChildViewAt() was called on SubmenuView but the child was not deleted. BUG=none TEST=none Review URL: http://codereview.chromium.org/6932052 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84796 0039d316-1c4b-4281-b951-d872f2087c98
* Enable TestViewsDelegates for views unittests and views_examples by defaultoshima@google.com2011-05-102-11/+0
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/6980004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84720 0039d316-1c4b-4281-b951-d872f2087c98
* Delete Obsolete PaintNow methodoshima@google.com2011-05-091-5/+0
| | | | | | | | | | | This seems to be doing nothing now. BUG=none TEST=none Review URL: http://codereview.chromium.org/6969005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84683 0039d316-1c4b-4281-b951-d872f2087c98
* Add simple drag and drop to NativeTextfieldViews.msw@chromium.org2011-05-093-5/+376
| | | | | | | | | | | | | | | | | Supports DRAG_COPY to other views/windows. Supports DRAG_MOVE within the same view. Fix DropHelper coordinate translation (not used elsewhere). Fix NativeTextfieldViewsTest.DoubleAndTripleClickTest. This patch set depends on my changes at: http://codereview.chromium.org/6893096/ BUG=72040 TEST=--enable-textfield-views drag and drop interaction. Review URL: http://codereview.chromium.org/6902145 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84652 0039d316-1c4b-4281-b951-d872f2087c98
* ComboBox needs a minimum menu width and now uses MenuItemView.rhashimoto@chromium.org2011-05-092-3/+15
| | | | | | | | | | | | | | | Added SubmenuView::set_minimum_preferred_width() to put an optional lower bound on menu width (default 0 for no lower bound) for MenuItemView menus. This CL originally included a minimum width setting for the ChromiumOS network status menu, but the network status menu conversion from Menu2 was reverted. Since the change is also needed for ComboBox I am handling it separately. BUG=chromium-os:12988 TEST=none Review URL: http://codereview.chromium.org/6900028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84624 0039d316-1c4b-4281-b951-d872f2087c98
* Remove SetMultiLine() method from CheckboxNt class, since its now properlyrogerta@chromium.org2011-05-062-13/+0
| | | | | | | | | | | implemented in TextButtonBase base class. BUG=None TEST=None, no code calls this function yet Review URL: http://codereview.chromium.org/6932042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84496 0039d316-1c4b-4281-b951-d872f2087c98
* Add multi-line support to TextButtonBase since this is needed by the derivedrogerta@chromium.org2011-05-062-8/+55
| | | | | | | | | | | | | checkbox and radio button classes. BUG=None TEST=There should be no visible changes to existing text buttons, since this option is off by default. It will be turned on for some radio buttons and checkboxes in a future CL. Review URL: http://codereview.chromium.org/6927023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84471 0039d316-1c4b-4281-b951-d872f2087c98
* FTP: split the directory listing parser test and re-enable it on TSan botsphajdan.jr@chromium.org2011-05-063-6/+12
| | | | | | | | | | | | | | The test was disabled on TSan bots becuase it was taking too much time. This change converts one huge test which parses ~30 directory listings to ~30 separate test cases. This change also moves ToLower/ToUpper from ui/base/l10n_util to base/i18n/case_conversion so that they can be used in net/ftp. BUG=79022 Review URL: http://codereview.chromium.org/6905027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84413 0039d316-1c4b-4281-b951-d872f2087c98
* wstring: remove wstring version of SplitStringevan@chromium.org2011-05-051-5/+4
| | | | | | | | | | Retry of r84336. BUG=23581 Review URL: http://codereview.chromium.org/6930047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84355 0039d316-1c4b-4281-b951-d872f2087c98
* Added Key event forwarding and handlking (not yet tested for GTK or Windows)saintlou@chromium.org2011-05-059-49/+175
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/6931033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84314 0039d316-1c4b-4281-b951-d872f2087c98
* Removing Menu2 (size is not settable, waiting on another CL)saintlou@chromium.org2011-05-052-59/+56
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/6927038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84253 0039d316-1c4b-4281-b951-d872f2087c98
* Remove crrev.com/82385 debug code added for crbug.com/78792.msw@chromium.org2011-05-044-32/+2
| | | | | | | | | | | | | | | | | | | | | Scott's crrev.com/83066 & crrev.com/83776 fix the root crbug.com/80392. The debug code in question moved the crash callstack from: views::MenuController::GetMenuPartByScreenCoordinate ex/ http://crash/reportdetail?reportid=faa16e3bc5833288 Catching the freed object access earlier at: views::SubmenuView::GetMenuItem ex/ http://crash/reportdetail?reportid=353971611ff1a9a2 but crash/ doesn't show any similar callstacks at/after 13.0.749.0 (83125). Please double check crash/, as I don't have much experience with it. BUG=78792 TEST=none Review URL: http://codereview.chromium.org/6935005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84142 0039d316-1c4b-4281-b951-d872f2087c98
* Revert to non-static members for click tracking.msw@chromium.org2011-05-043-16/+25
| | | | | | | | | | | | | | Revert focus to textfield, add test for focus. This is based on the CL at codereview.chromium.org/6929002 This is in response to regressions from Issue crbug.com/83991 BUG=none TEST=none Review URL: http://codereview.chromium.org/6928006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84057 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor NativeTextfieldViews mouse handlers.msw@chromium.org2011-05-034-94/+63
| | | | | | | | | | | | | | Add support methods for this and coming changes. Simplify NativeTextfieldViewsTest.DoubleAndTripleClickTest. Refactor TextfieldViewsModel::MoveCursorTo*. Detect selection changes in TextfieldViewsModel::MoveCursorTo. BUG=72040 TEST=--use-pure-views textfield interaction. Review URL: http://codereview.chromium.org/6893096 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83991 0039d316-1c4b-4281-b951-d872f2087c98
* Use single command line flag for all pure Views situations,saintlou@chromium.org2011-05-032-10/+4
| | | | | | | | | | | rather than enabling case by case BUG=none TEST=none Review URL: http://codereview.chromium.org/6911018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83972 0039d316-1c4b-4281-b951-d872f2087c98
* Rename View::GetCursor and simplify arguments.msw@chromium.org2011-05-038-74/+58
| | | | | | | | | | | | | | | | Simplify RootView::UpdateCursor with MouseEvent ctor support. Restore pre-r83123 WigetWin::SetCursor(NULL) behavior. Cleanup (function ordering, OVERRIDEs, unnecessary "views::"). This originates from changes and comments of Patch Set 3 at: http://codereview.chromium.org/6893096/ BUG=72040 TEST=Mouse cursors. Review URL: http://codereview.chromium.org/6910032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83970 0039d316-1c4b-4281-b951-d872f2087c98
* 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
* Factored code drawing the focusable border used in some Views controlssaintlou@chromium.org2011-05-036-172/+135
| | | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/6910009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83849 0039d316-1c4b-4281-b951-d872f2087c98
* Increase warning level to 4 on Visual Studiomaruel@chromium.org2011-05-031-1/+1
| | | | | | | | | | | | | This requires disabling most /W4 warnings so the patch doesn't get too large. I still fixed a few bugs so I didn't have to disable some more serious warnings. Most of these warnings are already enabled on gcc so it's mostly windows-specific code that is affected. BUG=none TEST=none Review URL: http://codereview.chromium.org/6902069 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83840 0039d316-1c4b-4281-b951-d872f2087c98
* A workaround for textfield crash in views_examples.oshima@google.com2011-05-031-4/+6
| | | | | | | | | BUG=chromium-os:14810, chromium:81320 TEST=run views_examples. Review URL: http://codereview.chromium.org/6911020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83827 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
* When GetIcon returns false on Windows, we should not use the icon it ↵finnur@chromium.org2011-05-021-3/+4
| | | | | | | | | | | | outputs. This makes Windows consistent with Linux and Mac, and avoids silly mistakes like http://crbug.com/80647 BUG=80988 TEST=None Review URL: http://codereview.chromium.org/6880317 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83716 0039d316-1c4b-4281-b951-d872f2087c98
* Initial implementation of pure Views combobox (aka dropdown list). The ↵saintlou@chromium.org2011-04-294-3/+530
| | | | | | | | | | | | | | | | | following known missing items will be added in a separate CL + RTL handling + possible vertical centering of menu (UX) + Handle Key events for accessibility + Factor the focused border also present in textfield + look of the double arrow (now drawn in skia) BUG=none TEST=none Review URL: http://codereview.chromium.org/6880224 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83617 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
* Fix crash in RenderViewContextMenuViews::RunMenuAt. As part of fixingsky@chromium.org2011-04-282-0/+3
| | | | | | | | | | | | this I'm centralizing how we notify the view of menu showing/hiding. BUG=80099 80879 TEST=none R=estade@chromium.org,ben@chromium.org Review URL: http://codereview.chromium.org/6901075 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83444 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
* Trigger find in page when pasting even if the text is not changed.suzhe@google.com2011-04-285-95/+108
| | | | | | | | | BUG=79002 TEST=See bug report. Review URL: http://codereview.chromium.org/6825034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83268 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes timing issue with when MenuClosed is sent to thesky@chromium.org2011-04-271-3/+3
| | | | | | | | | | | | | | model. MenuClosed needs to be invoked after we schedule the task to execute the command, otherwise MenuClosed is processed before the command. BUG=80077 TEST=see bug R=ben@chromium.org Review URL: http://codereview.chromium.org/6903071 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83220 0039d316-1c4b-4281-b951-d872f2087c98
* Step 5 in native theme refactoringrogerta@chromium.org2011-04-272-37/+33
| | | | | | | | | | | | | | | | | | Moved all calls to new API. Kept PaintTextField() still available from the old API since there is one user of the method that is not in views::View specific code, and does not have access to gfx::Canvas and such. Also moved callers of GetThemePartSize() to the new GetPartSize() API. BUG=None TEST=Use the following URL to test all possible controls on web pages: http://www.corp.google.com/~rogerta/no_crawl/widgets_test.html All controls should look and before the same with and without my changes. Also, make sure the chrome UI has not been changed, for example the wrench menu. Review URL: http://codereview.chromium.org/6880107 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83204 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
* Scrap WNDCLASSEX.hCursor, update GetCursorForPoint.msw@chromium.org2011-04-274-19/+9
| | | | | | | | | | | | | | | | | Default to Win arrow in View::GetCursorForPoint & RootView::UpdateCursor. Simplify WidgetWin::SetCursor, avoid sending NULL. Only SetCuror on client events (DWM handles non-client). RIP TextButtonWithHandCursorOver (r57652 through r64531). RIP WindowWin::InitClass & |resize_cursors_|. Add OVERRIDE specifiers liberally. BUG=35356 TEST=Cursor styles shown in Win & Linux toolkit_views. Review URL: http://codereview.chromium.org/6880201 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83123 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
* Fixes crash in menu code that would happen if you attempted to show asky@chromium.org2011-04-265-25/+42
| | | | | | | | | | | | | | | context menu while a context menu was already shown. The code would end up attempting to access an object that was since deleted (the MenuItemView). In fixing the crash I realized the logic wasn't quite right for this case either, so fixed that too and added a test. BUG=80392 TEST=see bug R=ben@chromium.org Review URL: http://codereview.chromium.org/6905033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83066 0039d316-1c4b-4281-b951-d872f2087c98
* Rename CreateParams to InitParams.ben@chromium.org2011-04-266-7/+7
| | | | | | | | | http://crbug.com/72040 TEST=none TBR=sky Review URL: http://codereview.chromium.org/6901034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83057 0039d316-1c4b-4281-b951-d872f2087c98