summaryrefslogtreecommitdiffstats
path: root/views/controls
Commit message (Collapse)AuthorAgeFilesLines
* Merge 87463 - Use the right version of IsEnabled() when updating the color ↵zork@chromium.org2011-06-091-3/+1
| | | | | | | | | | | | | | | of a TextButton BUG=chromium-os:15963 TEST=Manual Review URL: http://codereview.chromium.org/7080051 TBR=zork@chromium.org Review URL: http://codereview.chromium.org/7003075 git-svn-id: svn://svn.chromium.org/chrome/branches/782/src@88453 0039d316-1c4b-4281-b951-d872f2087c98
* views: Make View::GetBaseline() a const method.tfarina@chromium.org2011-05-272-2/+2
| | | | | | | | | | | BUG=72040 TEST=None R=ben@chromium.org Review URL: http://codereview.chromium.org/7086008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87107 0039d316-1c4b-4281-b951-d872f2087c98
* views: Add OnEnabledChanged() method to View class.tfarina@chromium.org2011-05-2725-79/+63
| | | | | | | | | | | | | | | | | | | Changes done here: - Override OnEnabledChanged() in the derived classes from View instead of SetEnable(). - Make SetEnable() a member function not a virtual one. - Make |enabled_| a private data member variable not a protected one. - Some other misc cleanups. Note: The third item was a TODO for beng. BUG=72040 TEST=None R=ben@chromium.org Review URL: http://codereview.chromium.org/6976048 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87080 0039d316-1c4b-4281-b951-d872f2087c98
* Makes rendering of selected disabled menu items match what windows does. As ↵sky@chromium.org2011-05-274-12/+26
| | | | | | | | | | | | well as disallowing opening disabled child menus by way of the keyboard. BUG=80837 TEST=none R=ben@chromium.org Review URL: http://codereview.chromium.org/7062031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87064 0039d316-1c4b-4281-b951-d872f2087c98
* Couple more wrench menu issues. The patch I sent around a couple ofsky@chromium.org2011-05-271-1/+7
| | | | | | | | | | | | | | | | | | days back didn't include these: . If other bookmarks folder is empty it wouldn't show a menu item for (empty). . Deleting the last item in the other folder would prematurely close the menu. . 'always show bookmark bar' wasn't rendering the check. BUG=84167 TEST=none R=ben@chromium.org Review URL: http://codereview.chromium.org/7076027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87031 0039d316-1c4b-4281-b951-d872f2087c98
* This change implements a first pass in the effort to remove the dependency ↵twiz@chromium.org2011-05-265-17/+16
| | | | | | | | | | | | | | of PlatformDevice within Chrome. The Skia library now provides multiple back-ends for the SkDevice class, so PlatformDevice's inheritance of SkDevice, and the assumption of instances of PlatformDevice limits the use of these new back-ends. A new set of helper functions is provided for the PlatformDevice entry points. Upon construction of a PlatformDevice, a pointer to the interface is cached in the parent SkDevice's SkMetaData. The new helper functions forward calls to the interface cached in the metadata. BUG=NONE TEST=NONE Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=86625 Reverted: http://src.chromium.org/viewvc/chrome?view=rev&revision=86625 Review URL: http://codereview.chromium.org/7019013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86823 0039d316-1c4b-4281-b951-d872f2087c98
* base/i18n: Pass |str| as const reference in BreakIterator::Init().tfarina@chromium.org2011-05-251-2/+2
| | | | | | | | | | | BUG=None TEST=out/Debug/base_unittests --gtest_filter=BreakIteratorTest.* R=tsepez@chromium.org,evan@chromium.org Review URL: http://codereview.chromium.org/7008005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86689 0039d316-1c4b-4281-b951-d872f2087c98
* Fix clang build for http://codereview.chromium.org/7067032/.rhashimoto@chromium.org2011-05-253-0/+13
| | | | | | | | | BUG=none TBR=sky Review URL: http://codereview.chromium.org/6987030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86686 0039d316-1c4b-4281-b951-d872f2087c98
* Add MenuModelAdapter to wrap ui::MenuModel with views::MenuDelegate interface.rhashimoto@chromium.org2011-05-254-1/+524
| | | | | | | | | | | | | | | | | - added ViewsDelegate::GetDispositionForEvent() pure virtual - added MenuModelAdapter - added unit test for MenuModelAdapter - added comment for MenuModel::GetFirstItemIndex() that callers may pass NULL for NativeMenu argument - fixed index offset bug in MenuModel::GetModelAndIndexForCommandId() - fixed spurious call to MenuDelegate::IsCommandEnabled() BUG=none TEST=included Review URL: http://codereview.chromium.org/7067032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86677 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes couple of issues with bookmarks in wrench menu:sky@chromium.org2011-05-251-2/+7
| | | | | | | | | | | | | | | | | | | | . Crash when deleting via context menu. This was happening because BookmarkMenuDelegate didn't keep a handle to the menu item it added the items to. . If other bookmarks folder is empty it wouldn't show a menu item for (empty). . Deleting the last item in the other folder would prematurely close the menu. . Hit DCHECK when adding empty menu (long standing issue). BUG=83746 TEST=from the wrench menu on windows right click a bookmark, delete it, and make sure you don't crash. R=ben@chromium.org Review URL: http://codereview.chromium.org/7066034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86634 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 86625 - This change implements a first pass in the effort to remove ↵vandebo@chromium.org2011-05-255-16/+17
| | | | | | | | | | | | | | | the dependency of PlatformDevice within Chrome. The Skia library now provides multiple back-ends for the SkDevice class, so PlatformDevice's inheritance of SkDevice, and the assumption of instances of PlatformDevice limits the use of these new back-ends. A new set of helper functions is provided for the PlatformDevice entry points. Upon construction of a PlatformDevice, a pointer to the interface is cached in the parent SkDevice's SkMetaData. The new helper functions forward calls to the interface cached in the metadata. BUG=NONE TEST=NONE Review URL: http://codereview.chromium.org/7019013 TBR=twiz@chromium.org Review URL: http://codereview.chromium.org/6987019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86629 0039d316-1c4b-4281-b951-d872f2087c98
* This change implements a first pass in the effort to remove the dependency ↵twiz@chromium.org2011-05-255-17/+16
| | | | | | | | | | | | of PlatformDevice within Chrome. The Skia library now provides multiple back-ends for the SkDevice class, so PlatformDevice's inheritance of SkDevice, and the assumption of instances of PlatformDevice limits the use of these new back-ends. A new set of helper functions is provided for the PlatformDevice entry points. Upon construction of a PlatformDevice, a pointer to the interface is cached in the parent SkDevice's SkMetaData. The new helper functions forward calls to the interface cached in the metadata. BUG=NONE TEST=NONE Review URL: http://codereview.chromium.org/7019013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86625 0039d316-1c4b-4281-b951-d872f2087c98
* Chromeos: virtual destructors should have virtual keyword (part 3).hans@chromium.org2011-05-252-2/+2
| | | | | | | | | | | | | Nu functionality change: virtual is only added to destructors that are already implicitly virtual. BUG=83408 TEST=chromiumos clang bot goes green TBR=battre Review URL: http://codereview.chromium.org/6979010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86615 0039d316-1c4b-4281-b951-d872f2087c98
* Chromeos: virtual destructors should have virtual keyword (part 2).hans@chromium.org2011-05-252-2/+2
| | | | | | | | | | | | | Nu functionality change: virtual is only added to destructors that are already implicitly virtual. BUG=83408 TEST=chromiumos clang bot goes green TBR=battre Review URL: http://codereview.chromium.org/7027006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86608 0039d316-1c4b-4281-b951-d872f2087c98
* Fix SkIntToScalar conversion.battre@chromium.org2011-05-251-3/+3
| | | | | | | | | | This broke the Chrome OS bot http://build.chromium.org/p/chromium/builders/Linux%20Tests%20%28ChromiumOS%20dbg%29%281%29/builds/607/steps/browser_tests/logs/stdio BUG=no TEST=no TBR=ben@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86589 0039d316-1c4b-4281-b951-d872f2087c98
* Make clicks work on views_examples with touchui.sadrul@chromium.org2011-05-242-2/+162
| | | | | | | | | BUG=none TEST=views_examples work with touchui Review URL: http://codereview.chromium.org/6990060 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86457 0039d316-1c4b-4281-b951-d872f2087c98
* Allow adjustment of MenuItemView top and bottom margins.rhashimoto@chromium.org2011-05-232-10/+32
| | | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/6961032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86298 0039d316-1c4b-4281-b951-d872f2087c98
* Change chrome to use the new native themed radio button.rogerta@chromium.org2011-05-237-56/+63
| | | | | | | | | | | | | | | | | | While testing the chromeos password changed dialog, I noticed that the dialog was clipped at the bottom, so that the text field to enter the old password was not fully visible. This was with and without my change. To fix, I increase the height of the dialog, hence the locale_settings.grd change. BUG=None TEST=Make sure all uses of radio buttons in chrome, on all platforms including chromeos, work as expected. The look may be slightly different, but the behaviour should be the same. To test the password changed dialog on chromeos, login and then logout with a given account. Change the password of that account (with another computer for example) and then log back in using the new password. The text field at the bottom should not be clipped. Review URL: http://codereview.chromium.org/6955002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86283 0039d316-1c4b-4281-b951-d872f2087c98
* views: Rename child_widget() to GetChildWidget().tfarina@chromium.org2011-05-212-4/+6
| | | | | | | | | | | | | | | This is a virtual method, so it shouldn't use the unix_hacker style. Note: This was a TODO for ben. BUG=None TEST=None R=ben@chromium.org Review URL: http://codereview.chromium.org/7056027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86189 0039d316-1c4b-4281-b951-d872f2087c98
* Move RootView to the internal namespace.ben@chromium.org2011-05-2010-22/+20
| | | | | | | | | | | Most people should not be using the RootView type. The few cases that do should static_cast for now, until I can find a way to expose the functionality they need on Widget. BUG=72040 TEST=none TBR=sky Review URL: http://codereview.chromium.org/7040018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86084 0039d316-1c4b-4281-b951-d872f2087c98
* ui/base/models: Convert GetKeyCode() to unit_hacker() style (key_code()).tfarina@chromium.org2011-05-205-7/+7
| | | | | | | | | | | | | Note: This was a TODO for beng. BUG=None TEST=None R=ben@chromium.org Review URL: http://codereview.chromium.org/7050025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86079 0039d316-1c4b-4281-b951-d872f2087c98
* Rename WindowWin|Gtk->NativeWindowWin|Gtkben@chromium.org2011-05-191-5/+1
| | | | | | | | | BUG=72040 TEST=none TBR=sky Review URL: http://codereview.chromium.org/7048006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85969 0039d316-1c4b-4281-b951-d872f2087c98
* Adds two methods to the MenuDelegate I'm going to need for bookmarksky@chromium.org2011-05-193-6/+15
| | | | | | | | | | | | | menus. Tweaks some wrapping in bookmark_utils.cc and adds an assertion to bookmark_bar_view_test. BUG=81263 TEST=none R=ben@chromium.org Review URL: http://codereview.chromium.org/7029046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85960 0039d316-1c4b-4281-b951-d872f2087c98
* Make NativeButton on touchui focusable. This allows accessibility events to ↵sadrul@chromium.org2011-05-191-0/+1
| | | | | | | | | | | be triggered on focus. BUG=none TEST=AccessibilityEventRouterViewsTest.TestFocusNotification Review URL: http://codereview.chromium.org/7029026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85915 0039d316-1c4b-4281-b951-d872f2087c98
* Fix bustage... these files were ommited from the CL.ben@chromium.org2011-05-191-1/+1
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85911 0039d316-1c4b-4281-b951-d872f2087c98
* Rename WidgetWin/Gtk -> NativeWidgetWin/Gtk.ben@chromium.org2011-05-1913-44/+44
| | | | | | | | | BUG=72040 TEST=none TBR=sky Review URL: http://codereview.chromium.org/7039050 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85910 0039d316-1c4b-4281-b951-d872f2087c98
* Clean up a few things now that specialized window types are subclasses of ↵ben@chromium.org2011-05-182-23/+11
| | | | | | | | | | Window/Widget. BUG=72040 TEST=none Review URL: http://codereview.chromium.org/7045010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85797 0039d316-1c4b-4281-b951-d872f2087c98
* Add support for checkboxes in menus that contain icons.atwilson@chromium.org2011-05-181-0/+43
| | | | | | | | | | | Updated NativeMenuWin::OnDrawItem() to properly render checkbox items. BUG=82996 TEST=Install background app on windows, right click on status tray icon, see checkbox and icon in menu. Review URL: http://codereview.chromium.org/7041001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85771 0039d316-1c4b-4281-b951-d872f2087c98
* 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