summaryrefslogtreecommitdiffstats
path: root/views/controls
Commit message (Collapse)AuthorAgeFilesLines
* Make uneditable when readonly.oshima@google.com2011-01-205-20/+105
| | | | | | | | | | | | | This change makes the textfield uneditable. The text can still be updated via API (which is necessary to show URL in popup). BUG=none TEST=uadded new ReadOnlyTest Review URL: http://codereview.chromium.org/6314012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72022 0039d316-1c4b-4281-b951-d872f2087c98
* Fix regression in submenus not working.jam@chromium.org2011-01-201-2/+15
| | | | | | | BUG=69797 Review URL: http://codereview.chromium.org/6304013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72005 0039d316-1c4b-4281-b951-d872f2087c98
* touch: Allow grabbing/ungrabbing touch devices for XInput2.sadrul@chromium.org2011-01-201-0/+21
| | | | | | | | | | | | | | | This allows touch devices to be grabbed when events from the mouse/keyboard are grabbed. This also exposes TouchFactory, which will eventually be used in more places. BUG=none TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=71879 Review URL: http://codereview.chromium.org/6300007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72002 0039d316-1c4b-4281-b951-d872f2087c98
* Move a bunch of random other files to src/ui/baseben@chromium.org2011-01-209-16/+16
| | | | | | | | | | 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
* Revert 71879 due to compile failure - touch: Allow grabbing/ungrabbing touch ↵sadrul@chromium.org2011-01-201-21/+0
| | | | | | | | | | | | | | | | | | devices for XInput2. This allows touch devices to be grabbed when events from the mouse/keyboard are grabbed. This also exposes TouchFactory, which will eventually be used in more places. BUG=none TEST=none Review URL: http://codereview.chromium.org/6300007 TBR=sadrul@chromium.org Review URL: http://codereview.chromium.org/6349008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71885 0039d316-1c4b-4281-b951-d872f2087c98
* touch: Allow grabbing/ungrabbing touch devices for XInput2.sadrul@chromium.org2011-01-201-0/+21
| | | | | | | | | | | | | This allows touch devices to be grabbed when events from the mouse/keyboard are grabbed. This also exposes TouchFactory, which will eventually be used in more places. BUG=none TEST=none Review URL: http://codereview.chromium.org/6300007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71879 0039d316-1c4b-4281-b951-d872f2087c98
* Move UI-relevant Windows files to ui/base.ben@chromium.org2011-01-198-22/+21
| | | | | | | | | | BUG=none TEST=none TBR=brettw Review URL: http://codereview.chromium.org/6254011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71854 0039d316-1c4b-4281-b951-d872f2087c98
* Move more dnd related files to ui/baseben@chromium.org2011-01-194-12/+12
| | | | | | | | | | 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
* Add TextRange and GetSelectedRange, SelectRange and GetCursorPosition, which ↵oshima@google.com2011-01-1912-26/+325
| | | | | | | | | | | | | | | are necessary to implement ominibox. I'm adding them as Views only and left win/gtk blank because we don't use win/gtk impl for omnibox. I also didn't add TextRange variable to Textfield as its state is kept in Model. Let me know if you want to add it in Textfield class as well. BUG=none TEST=added new tests RangeTest, SelectRangeTest Review URL: http://codereview.chromium.org/6318004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71811 0039d316-1c4b-4281-b951-d872f2087c98
* views: Implement NativeTableGtk::RemoveColumn method.tfarina@chromium.org2011-01-191-3/+13
| | | | | | | | | | | | | | | Also fix the following error when we try to get the width of column that does not exist anymore. (views_examples:3921): Gtk-CRITICAL **: gtk_tree_view_column_get_width: assertion `GTK_IS_TREE_VIEW_COLUMN (tree_column)' failed BUG=None TEST=export GYP_DEFINES="toolkit_views" && gclient runhooks && make -j4 -k views_examples out/Debug/views_examples, go to the table tab. Now clicking in one of the checkboxes, the corresponded column should be removed. Review URL: http://codereview.chromium.org/6256004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71786 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
* Allow printing/saving a plugin through right click menu, even if it's in a ↵jam@chromium.org2011-01-151-17/+22
| | | | | | | | | frame or an embed element. BUG=50285 Review URL: http://codereview.chromium.org/6142013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71519 0039d316-1c4b-4281-b951-d872f2087c98
* Fix for broken buildvarunjain@chromium.org2011-01-143-9/+9
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/6287002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71469 0039d316-1c4b-4281-b951-d872f2087c98
* Implementing context menu for the new views textfield.varunjain@chromium.org2011-01-146-25/+177
| | | | | | | | | BUG=none TEST=right click on the new textfield should show the context menu and all commands on the menu should work. Review URL: http://codereview.chromium.org/6155011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71467 0039d316-1c4b-4281-b951-d872f2087c98
* Remove wstring from views. Part 3: Switch accessibility strings to string16.avi@chromium.org2011-01-1421-45/+48
| | | | | | | | | 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-1431-119/+157
| | | | | | | | | BUG=none TEST=none TBR=brettw git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71446 0039d316-1c4b-4281-b951-d872f2087c98
* Adds some debugging in code in hopes of figuring out a crash in thesky@chromium.org2011-01-132-90/+121
| | | | | | | | | | | | | | menu code. It seems like we end up getting mouse events from a widget that is no longer visible. Additionally it seems possible that the selection is cleared before we expect it. Hopefully both of these CHECKs will help figure out what is going on. BUG=62872 TEST=none Review URL: http://codereview.chromium.org/6288002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71371 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-1329-249/+250
| | | | | | | | | | 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
* Delete test view delegate at end of testjochen@chromium.org2011-01-131-1/+4
| | | | | | | | | BUG=none TEST=leak 000000002551055A goes away Review URL: http://codereview.chromium.org/6132009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71309 0039d316-1c4b-4281-b951-d872f2087c98
* views: Implement NativeTableGtk::SetColumnWidth method.tfarina@chromium.org2011-01-131-1/+7
| | | | | | | | | | BUG=None TEST=export GYP_DEFINES="toolkit_views" && gclient runhooks && make -j4 -k views_examples out/Debug/views_examples, everything should work as before. Review URL: http://codereview.chromium.org/6166011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71262 0039d316-1c4b-4281-b951-d872f2087c98
* Re-land 71230.eroman@chromium.org2011-01-133-58/+325
| | | | | | | | | | | | | | | | | | | | | | This restores 71230 which was reverted in 71252 by sheriff (to see if it was responsible for a linux test failure -- it was not). Original change by alekseys: Streamline the layout of the BrowserView's children TabContents views. Modify SingleSplitView to calculate its children view's bounds, but do not actually resize them and change BrowserViewLayout accordingly (BrowserViewLayout resizes all views now). Do all reserved contents rect calculations before resizing TabContents views. Rationale: to do all BrowserView layout related actions in the context of BrowserViewLayout::Layout call and to minimize actual contents re-layouts. BUG=51084 TEST=All tests should pass Review URL: http://codereview.chromium.org/5606012 Review URL: http://codereview.chromium.org/6247001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71259 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 71230 to see if it is related to hang on linux interactive_ui_tests.eroman@chromium.org2011-01-123-325/+58
| | | | | | | | | | | | | | | | | | | | | | Original CL description: Streamline the layout of the BrowserView's children TabContents views. Modify SingleSplitView to calculate its children view's bounds, but do not actually resize them and change BrowserViewLayout accordingly (BrowserViewLayout resizes all views now). Do all reserved contents rect calculations before resizing TabContents views. Rationale: to do all BrowserView layout related actions in the context of BrowserViewLayout::Layout call and to minimize actual contents re-layouts. BUG=51084 TEST=All tests should pass Review URL: http://codereview.chromium.org/5606012 TBR=alekseys@chromium.org Review URL: http://codereview.chromium.org/6121007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71252 0039d316-1c4b-4281-b951-d872f2087c98
* Streamline the layout of the BrowserView's children TabContents views.alekseys@chromium.org2011-01-123-58/+325
| | | | | | | | | | | | | | | | Modify SingleSplitView to calculate its children view's bounds, but do not actually resize them and change BrowserViewLayout accordingly (BrowserViewLayout resizes all views now). Do all reserved contents rect calculations before resizing TabContents views. Rationale: to do all BrowserView layout related actions in the context of BrowserViewLayout::Layout call and to minimize actual contents re-layouts. BUG=51084 TEST=All tests should pass Review URL: http://codereview.chromium.org/5606012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71230 0039d316-1c4b-4281-b951-d872f2087c98
* Handle WM_SYSKEYDOWN in NativeTextfieldWin.oshima@google.com2011-01-121-0/+3
| | | | | | | | | BUG=69248 TEST=Manual: open find bar and hit alt on debug build. Review URL: http://codereview.chromium.org/6156009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71206 0039d316-1c4b-4281-b951-d872f2087c98
* Move OSExchangeData from src/app to src/ui/base/dragdropben@chromium.org2011-01-123-2/+8
| | | | | | | | | | BUG=none TEST=none TBR=brettw Review URL: http://codereview.chromium.org/6200005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71205 0039d316-1c4b-4281-b951-d872f2087c98
* Disable failing tests on WINoshima@google.com2011-01-122-2/+7
| | | | | | | | | | | | * disable Clipboard * TraveralTest wasn't correctly disabled. This CL fixes it. BUG=none TEST=views_unittests, unittests on Win should cycle green. Review URL: http://codereview.chromium.org/6198006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71198 0039d316-1c4b-4281-b951-d872f2087c98
* Compile and test TextfieldViews on win as well.oshima@google.com2011-01-126-43/+53
| | | | | | | | | | | | | Created common test base class for views. Note: Textfield::RequestFocus is failing because Windows' FocusManager::ClearNativeFocus resets the focused view to NULL for some reason. I don't have win at hand and am now requesting win7. I will look into it once I've got win7. BUG=none TEST=native_textfield_views_unittest and textfield_views_model_unittest have been enabled for win. Review URL: http://codereview.chromium.org/6102003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71183 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 71169 - Revert 71167 - Remove wstring from gfx.avi@chromium.org2011-01-128-23/+21
| | | | | | | | | | | | | | | 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 71170 - Delete test view delegate at end of testjochen@chromium.org2011-01-121-2/+1
| | | | | | | | | | | | BUG=none TEST=leak 000000002551055A goes away Review URL: http://codereview.chromium.org/6173009 TBR=jochen@chromium.org Review URL: http://codereview.chromium.org/6128010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71174 0039d316-1c4b-4281-b951-d872f2087c98
* Delete test view delegate at end of testjochen@chromium.org2011-01-121-1/+2
| | | | | | | | | BUG=none TEST=leak 000000002551055A goes away Review URL: http://codereview.chromium.org/6173009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71170 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 71167 - Remove wstring from gfx.joi@chromium.org2011-01-128-21/+23
| | | | | | | | | | | | 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
* Remove wstring from gfx.avi@chromium.org2011-01-128-23/+21
| | | | | | | | | BUG=68882 TEST=no visible changes; all tests pass Review URL: http://codereview.chromium.org/6121004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71167 0039d316-1c4b-4281-b951-d872f2087c98
* Implement clipboard features in views textfield.varunjain@chromium.org2011-01-125-1/+117
| | | | | | | | | BUG=none TEST=Added new test. Review URL: http://codereview.chromium.org/6004010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71136 0039d316-1c4b-4281-b951-d872f2087c98
* views: Implement NativeTableGtk::GetColumnWidth method.tfarina@chromium.org2011-01-111-2/+3
| | | | | | | | | | | | BUG=None TEST=export GYP_DEFINES="toolkit_views" && gclient runhooks && make -j4 -k views_examples out/Debug/views_examples Go to the table tab. Click on one of the checkboxes, you shouldn't see an ERROR for this method. Review URL: http://codereview.chromium.org/6175002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71106 0039d316-1c4b-4281-b951-d872f2087c98
* views textfield: Handle ctrl and shift modifiers for Backspace and Deletesadrul@chromium.org2011-01-113-0/+61
| | | | | | | | | BUG=none TEST=NativeTextfieldViewsTest.InsertionDeletionTest Review URL: http://codereview.chromium.org/6119003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71041 0039d316-1c4b-4281-b951-d872f2087c98
* Move clipboard from app/ to ui/baseben@chromium.org2011-01-102-11/+13
| | | | | | | | | | BUG=none TEST=none TBR=brettw Review URL: http://codereview.chromium.org/6135006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70938 0039d316-1c4b-4281-b951-d872f2087c98
* Remove wstring from views. Part 2: Switch accelerator strings to string16.avi@chromium.org2011-01-102-17/+18
| | | | | | | | | BUG=68267 TEST=no visible changes; all tests pass Review URL: http://codereview.chromium.org/6199005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70936 0039d316-1c4b-4281-b951-d872f2087c98
* Remove wstring from views. Part 1: Switch member variables to string16.avi@chromium.org2011-01-1019-53/+62
| | | | | | | | | BUG=68267 TEST=no visible changes; all tests pass Review URL: http://codereview.chromium.org/6123003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70899 0039d316-1c4b-4281-b951-d872f2087c98
* Remove wstring from l10n_util. Part 8, the last part.avi@chromium.org2011-01-071-1/+1
| | | | | | | | | BUG=9911 TEST=no visible changes; all tests pass Review URL: http://codereview.chromium.org/6156001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70769 0039d316-1c4b-4281-b951-d872f2087c98
* Move animation code to new ui/base/animation directory.ben@chromium.org2011-01-074-11/+13
| | | | | | | | | | BUG=none TEST=none TBR=brettw Review URL: http://codereview.chromium.org/6154001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70743 0039d316-1c4b-4281-b951-d872f2087c98
* focus reverse traversal was not working for TextfieldViews.oshima@chromium.org2011-01-0610-63/+230
| | | | | | | | | | | | | | Both Textfield and TextfieldViews were focusable and alt-tab was setting the focus back to the Textfield, which sets the focus to the its TextfieldViews. This fixes the issue by making Textfield non focusable. BUG=none TEST=FocusTest is added to unittest. Review URL: http://codereview.chromium.org/5988010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70624 0039d316-1c4b-4281-b951-d872f2087c98
* Replace Textfield::Keystroke with views::KeyEvent.oshima@chromium.org2011-01-056-84/+33
| | | | | | | | | | | | | It looks big, but most of change is simple signature change. Note: I need your advice on how to deal with WM_CHAR event on Win. Please see my comment below. BUG=none TEST=no new functionality. All tests should still pass. Review URL: http://codereview.chromium.org/6034002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70553 0039d316-1c4b-4281-b951-d872f2087c98
* views: Improve cursor movements on word boundaries.sadrul@chromium.org2011-01-053-12/+69
| | | | | | | | | | | | | | | | | | | | (1) When there's blank space at the end of the string in the textfield and the cursor is at the end, 'move cursor to previous word' should move the cursor at the beginning of the last word. (2) When there's blank space at the end of the string, and the cursor is at the end of the last word, 'move cursor to next word' should move the cursor at the end. (3) Moving the cursor should make the cursor immediately visible. This is more inline with how GTK+ cursors behave. For example, constantly pressing the home-key in a GTK+ textfield makes the cursor visible for the duration of the keypress. BUG=none TEST=NativeTextfieldViewsTest.CursorMovement Review URL: http://codereview.chromium.org/5972008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70468 0039d316-1c4b-4281-b951-d872f2087c98
* views: Fix shifted keyevents in textfield.sadrul@chromium.org2011-01-042-4/+22
| | | | | | | | | | | | Pressing 0-9 in a textfield with caps lock turned on would generate shifted keyevents, which it shouldn't. So distinguish between caps-lock and shift. BUG=none TEST=none Review URL: http://codereview.chromium.org/6068005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70452 0039d316-1c4b-4281-b951-d872f2087c98
* Change Font.GetStringWidth() to take string16 instead of wstring.estade@chromium.org2011-01-045-12/+15
| | | | | | | | | | | do a bunch of string fixes along the way. BUG=none TEST=trybots Review URL: http://codereview.chromium.org/5985007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70440 0039d316-1c4b-4281-b951-d872f2087c98
* OnKeyPress was not returning true when keypress is handled.oshima@chromium.org2011-01-042-4/+14
| | | | | | | | | BUG=none TEST=TestOnKeyPressReturnValue is added. Review URL: http://codereview.chromium.org/5964013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70424 0039d316-1c4b-4281-b951-d872f2087c98
* Remove wstring from l10n_util. Part 4.avi@chromium.org2011-01-044-24/+31
| | | | | | | | | BUG=9911 TEST=no visible changes; all tests pass Review URL: http://codereview.chromium.org/5958017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70423 0039d316-1c4b-4281-b951-d872f2087c98
* Move app/win_util to app/win and fix the namespace usage.brettw@google.com2010-12-312-4/+4
| | | | | | | | | | | | | | Split out the two classes: ScopedComInitializer and ScopedCOMem (which I renamed) to separate files. I removed the win_util_path file which had one function in it and moved the function to win_util. Somehow, this was getting picked up by the nacl64 build and the call in sandbox_policy was then not being defined. I just implemented the function in-plcae since it's just a simple wrapper around a Windows API call. TEST=it compiles BUG=none Review URL: http://codereview.chromium.org/6013009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70343 0039d316-1c4b-4281-b951-d872f2087c98
* Move base/win_util to the base/win directory and use the base::win namespace.brettw@google.com2010-12-315-13/+13
| | | | | | | | | Fix up includes, many files including base/win_util don't actually need it. TEST=it compiles BUG=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70341 0039d316-1c4b-4281-b951-d872f2087c98