summaryrefslogtreecommitdiffstats
path: root/views/focus
Commit message (Collapse)AuthorAgeFilesLines
* Use VIEWS_API in a few places to fix component build for chromeos and touchui.sadrul@chromium.org2011-07-281-2/+2
| | | | | | | | | BUG=none TEST=manually, build works with 'chromeos=1 touchui=1 component=shared_library' Review URL: http://codereview.chromium.org/7524028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@94498 0039d316-1c4b-4281-b951-d872f2087c98
* Create views.dll / libviews.sodarin@chromium.org2011-07-286-15/+16
| | | | | | | R=sky@chromium.org,rvargas@chromium.org Review URL: http://codereview.chromium.org/7493017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@94428 0039d316-1c4b-4281-b951-d872f2087c98
* Removing unused NativeButton codesaintlou@chromium.org2011-07-261-30/+25
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/7493004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@94114 0039d316-1c4b-4281-b951-d872f2087c98
* Views views_unittests FocusManagerTest.FocusNativeControls use after freedhollowa@chromium.org2011-07-251-1/+0
| | | | | | | | | | | | | | | Fixes issue where NativeTabbedPaneGtk gets retained by the top-level FocusManager during the Widget::Close tear-down sequence. This fix clears focus before proceeding with the tear-down. This avoids redundant operations with the FocusManger as views get deleted, specifically in the FocusManager::ViewRemoved() call. Caught by Valgrind as a use after free violation: sh tools/valgrind/chrome_tests.sh views --gtest_filter=FocusManagerTest.FocusNativeControls BUG=89596 TEST=tools/valgrind/chrome_tests.sh views --gtest_filter=FocusManagerTest.FocusNativeControls Review URL: http://codereview.chromium.org/7468037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93894 0039d316-1c4b-4281-b951-d872f2087c98
* touch: Always expect XInput2 availability.sadrul@chromium.org2011-07-222-22/+0
| | | | | | | | | BUG=80790 TEST=touch compiles Review URL: http://codereview.chromium.org/6975045 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93621 0039d316-1c4b-4281-b951-d872f2087c98
* some cleanup for base/stl_utildilmah@chromium.org2011-07-191-1/+1
| | | | | | | | | | | | | removed unused/irrelevant functions removed irrelevant comments Moved stl_util-inl.h => stl_util.h BUG=None TEST=None Review URL: http://codereview.chromium.org/7342047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93110 0039d316-1c4b-4281-b951-d872f2087c98
* Convert some more view methods to the ui/views style.ben@chromium.org2011-07-151-6/+4
| | | | | | | | BUG=72040 TEST=none Review URL: http://codereview.chromium.org/7349021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92705 0039d316-1c4b-4281-b951-d872f2087c98
* Clean up FocusManageroshima@google.com2011-07-144-83/+28
| | | | | | | | | | | | | | Use Widget API to get FocusManager for native_view/window. Move FocusNatieView to native widget impl. This is necessary for NativeWidgetX BUG=none TEST=none Review URL: http://codereview.chromium.org/7351008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92497 0039d316-1c4b-4281-b951-d872f2087c98
* views: Add unittests for View::GetViewsWithGroup() method.tfarina@chromium.org2011-07-131-2/+1
| | | | | | | | | | | | | Also, rename it to GetViewsInGroup(). BUG=72040 TEST=views_unittests --gtest_filter=ViewTest.GetViewByID R=ben@chromium.org,sky@chromium.org Review URL: http://codereview.chromium.org/7328031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92430 0039d316-1c4b-4281-b951-d872f2087c98
* ClearNativeFocus: Do it from widget, with appropriate native-widget ↵sadrul@chromium.org2011-07-133-11/+7
| | | | | | | | | | | implementation. BUG=none TEST=none Review URL: http://codereview.chromium.org/7353007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92303 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 91716 - Temporarily disable these tests while I repro the crashes.ben@chromium.org2011-07-071-4/+4
| | | | | | | TBR=ben@chromium.org Review URL: http://codereview.chromium.org/7307038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91719 0039d316-1c4b-4281-b951-d872f2087c98
* Temporarily disable these tests while I repro the crashes.ben@chromium.org2011-07-071-4/+4
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91716 0039d316-1c4b-4281-b951-d872f2087c98
* Switch FocusManager to using ObserverList instead of keeping its listeners ↵pkasting@chromium.org2011-06-292-52/+16
| | | | | | | | | | in a simple vector. BUG=none TEST=none Review URL: http://codereview.chromium.org/7280013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91052 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor the glib message-pump, and use it as the base for a gtk message ↵sadrul@chromium.org2011-06-242-11/+12
| | | | | | | | | | | | | | | | | | | pump and an X message pump. The changes: * Rename MessagePumpGlibX to MessagePumpX. * Rename MessagePumpForUI to MessagePumpGlib. * Move some stuff out of MessagePumpGlib, and into MessagePumpGtk and MessagePumpX. * Rename MessagePumpForUI::Observer to MessageObserver, moved the platform-specific implementations into MessagePumpGtk and MessagePumpX. Ditto for MessagePumpForUI::Dispatcher. MessagePumpX is independent of MessagePumpGtk. At the moment, MessagePumpX does process some GDK event, but once we have a complete native_widget_x, we can take out the GDK processing and things should continue to work. BUG=none TEST=existing message-pump tests. Review URL: http://codereview.chromium.org/7250001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90418 0039d316-1c4b-4281-b951-d872f2087c98
* Fix even more crashes. To help identify remaining crashes now and in the ↵ben@chromium.org2011-06-161-3/+9
| | | | | | | | | | future, I have made the GetWidget methods on WidgetDelegate pure virtual. This will cause classes that don't define them to fail compile instead of crashing at run time. http://crbug.com/86119 TEST=none Review URL: http://codereview.chromium.org/7189019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89409 0039d316-1c4b-4281-b951-d872f2087c98
* Re-land:ben@chromium.org2011-06-163-7/+6
| | | | | | | | | | | | | | Move private NativeWidget methods to new internal interface NativeWidgetPrivate. This should make it harder to abuse accidentally. BUG=72040 TEST=none Review URL: http://codereview.chromium.org/7170019 Review URL: http://codereview.chromium.org/7189012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89357 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 89216 - Move private NativeWidget methods to new internal interface ↵ben@chromium.org2011-06-153-6/+7
| | | | | | | | | | | | | | | NativeWidgetPrivate. This should make it harder to abuse accidentally. BUG=72040 TEST=none Review URL: http://codereview.chromium.org/7170019 TBR=ben@chromium.org Review URL: http://codereview.chromium.org/7097016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89232 0039d316-1c4b-4281-b951-d872f2087c98
* Move private NativeWidget methods to new internal interface NativeWidgetPrivate.ben@chromium.org2011-06-153-7/+6
| | | | | | | | | | This should make it harder to abuse accidentally. BUG=72040 TEST=none Review URL: http://codereview.chromium.org/7170019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89216 0039d316-1c4b-4281-b951-d872f2087c98
* Add NativeWidgetDelegate::OnTouchEvent and move views::View::TouchStatus to ↵sadrul@chromium.org2011-06-141-2/+1
| | | | | | | | | | | ui::TouchStatus. BUG=none TEST=none Review URL: http://codereview.chromium.org/7147005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89079 0039d316-1c4b-4281-b951-d872f2087c98
* Eliminate Window completely.ben@chromium.org2011-06-132-18/+24
| | | | | | | | BUG=72040 TEST=none Review URL: http://codereview.chromium.org/7108047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88905 0039d316-1c4b-4281-b951-d872f2087c98
* views: Use vector<T>::operator[] instead of vector<T>::at in the remaining ↵tfarina@chromium.org2011-06-081-10/+10
| | | | | | | | | | | | | | | | | | cases. The implementation of vector<T>::at performs bounds checks and can through an exception std::out_of_range if you try to access an element that is not present in the array. That is less eficient and we don't want to through an exception anyway. BUG=None TEST=None R=pkasting@chromium.org,sky@chromium.org Review URL: http://codereview.chromium.org/7125012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88254 0039d316-1c4b-4281-b951-d872f2087c98
* views: Don't include the container type "vector" in the typedef ViewVector.tfarina@chromium.org2011-06-061-6/+5
| | | | | | | | | | | | | | | | - Rename ViewVector to simply Views. - Users generally should not know or care what the container is. - This makes reading easier as the code is not constantly pointing out to you, "hey! I'm a vector!" - Also it's less verbose, allows condensing a lot of loop declarations onto one line. BUG=72040 TEST=None R=pkasting@chromium.org,sky@chromium.org Review URL: http://codereview.chromium.org/7024023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87983 0039d316-1c4b-4281-b951-d872f2087c98
* views: Convert View::GetID/SetID functions to unix_hacker style.tfarina@chromium.org2011-06-031-49/+49
| | | | | | | | | | | BUG=72040 TEST=None R=ben@chromium.org Review URL: http://codereview.chromium.org/6969087 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87791 0039d316-1c4b-4281-b951-d872f2087c98
* views: Make View::SetFocusable() a simple setter accessor.tfarina@chromium.org2011-06-011-11/+9
| | | | | | | | | | | BUG=72040 TEST=None R=ben@chromium.org Review URL: http://codereview.chromium.org/7096015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87501 0039d316-1c4b-4281-b951-d872f2087c98
* Changing Checkbox class to use NativeTheme class for rendering instead ofrogerta@chromium.org2011-06-011-7/+7
| | | | | | | | | | | | | native controls. The original Checkbox class is renamed to NativeCheckbox. BUG=None TEST=The affected locations are: chromeos EULA page, uninstall view, chromeos wifi config, and create application shortcut view. Should verify that checkboxes in these locations look and behave as they did before. Review URL: http://codereview.chromium.org/7082041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87484 0039d316-1c4b-4281-b951-d872f2087c98
* Make Widget ownership a little clearer by expressing it in terms of an enum.ben@chromium.org2011-05-251-1/+1
| | | | | | | | BUG=72040 TEST=none Review URL: http://codereview.chromium.org/7031053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86669 0039d316-1c4b-4281-b951-d872f2087c98
* Change chrome to use the new native themed radio button.rogerta@chromium.org2011-05-231-3/+4
| | | | | | | | | | | | | | | | | | 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
* Fix touch build after hiding RootView.sadrul@chromium.org2011-05-201-0/+1
| | | | | | | | | BUG=none TEST=compiles with touchui Review URL: http://codereview.chromium.org/6961020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86094 0039d316-1c4b-4281-b951-d872f2087c98
* Move RootView to the internal namespace.ben@chromium.org2011-05-202-8/+7
| | | | | | | | | | | 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
* Rename WindowWin|Gtk->NativeWindowWin|Gtkben@chromium.org2011-05-193-4/+4
| | | | | | | | | 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
* Fix touch compile after WidgetGtk/NativeWidgetGtk rename.sadrul@chromium.org2011-05-191-0/+1
| | | | | | | | BUG=none TEST=touch buildbot goes green TBR=ben@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85914 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-196-15/+10
| | | | | | | | | 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
* Re-land:ben@chromium.org2011-05-135-34/+23
| | | | | | | | | | | | 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-135-23/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Split the hierarchy. ben@chromium.org2011-05-135-34/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Get the correct touch identifiers from an X event.sadrul@chromium.org2011-05-021-3/+17
| | | | | | | | | | | | Getting the correct touch identifiers makes it possible to do multi-finger tracking. BUG=none TEST=manually Review URL: http://codereview.chromium.org/6905074 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83811 0039d316-1c4b-4281-b951-d872f2087c98
* Create InitParams for Window.ben@chromium.org2011-04-281-4/+4
| | | | | | | | http://crbug.com/72040 TEST=none Review URL: http://codereview.chromium.org/6902049 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83384 0039d316-1c4b-4281-b951-d872f2087c98
* Rename CreateParams to InitParams.ben@chromium.org2011-04-261-2/+2
| | | | | | | | | 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
* Rework the way Widget::Init works:ben@chromium.org2011-04-261-17/+16
| | | | | | | | | | | | | - Remove SetCreateParams from the public Widget API. - Add parent/bounds fields to CreateParams - Make Widget::Init be the canonical init method (vs. WidgetWin/Gtk Init) and have it take a CreateParams. - NativeWidget now has a InitNativeWidget method, which subclasses can override. Everyone must call Widget::Init via Widget* (not WidgetWin* as this will be ambiguous to WindowImpl::Init). BUG=72040 TEST=none Review URL: http://codereview.chromium.org/6881107 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83037 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor some mouse/wheel/touch XEvent handling.msw@chromium.org2011-04-261-106/+31
| | | | | | | | | | | Delegate logic to Widget; nix most direct RootView uses. BUG=72040 TEST=Mouse & touch interaction in toolkit_views touchui. Review URL: http://codereview.chromium.org/6902025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83011 0039d316-1c4b-4281-b951-d872f2087c98
* Add NativeWidgetDelegate/Widget::OnKeyEvent post-IME handling.msw@chromium.org2011-04-262-3/+3
| | | | | | | | | | | | | | | | | | Refactor XEvent code and InputMethodGtk::DispatchKeyEvent. Nix WidgetWin::GetFocusedViewRootView, rename RootView::OnKeyEvent. Cleanup headers and refactor code in extension_input_api.cc. Rename WidgetGtk::OnEventKey to avoid overloading Widget::OnEventKey. BUG=72040 TEST=Key event handling in win/linux_views/touch; extension input API SendKeyboardEventInputFunction use. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=82713 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=82751 Review URL: http://codereview.chromium.org/6823055 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@82983 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 82751 - Add NativeWidgetDelegate/Widget::OnKeyEvent post-IME ↵msw@chromium.org2011-04-221-1/+8
| | | | | | | | | handling.Refactor XEvent code and InputMethodGtk::DispatchKeyEvent.Nix WidgetWin::GetFocusedViewRootView, rename RootView::OnKeyEvent.Cleanup headers and refactor code in extension_input_api.cc.BUG=72040TEST=Key event handling in win/linux_views/touch; extension input API SendKeyboardEventInputFunction use.Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=82713Review URL: http://codereview.chromium.org/6823055 TBR=msw@chromium.org Review URL: http://codereview.chromium.org/6897033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@82752 0039d316-1c4b-4281-b951-d872f2087c98
* Add NativeWidgetDelegate/Widget::OnKeyEvent post-IME handling.msw@chromium.org2011-04-221-8/+1
| | | | | | | | | | | | | | | Refactor XEvent code and InputMethodGtk::DispatchKeyEvent. Nix WidgetWin::GetFocusedViewRootView, rename RootView::OnKeyEvent. Cleanup headers and refactor code in extension_input_api.cc. BUG=72040 TEST=Key event handling in win/linux_views/touch; extension input API SendKeyboardEventInputFunction use. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=82713 Review URL: http://codereview.chromium.org/6823055 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@82751 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting since caused compile failures on Linux.amit@chromium.org2011-04-221-1/+8
| | | | | | | | Revert 82713 - Add NativeWidgetDelegate/Widget::OnKeyEvent post-IME handling.Refactor XEvent code and InputMethodGtk::DispatchKeyEvent.Nix WidgetWin::GetFocusedViewRootView, rename RootView::OnKeyEvent.Cleanup headers and refactor code in extension_input_api.cc.BUG=72040TEST=Key event handling in win/linux_views/touch; extension input API SendKeyboardEventInputFunction use.Review URL: http://codereview.chromium.org/6823055 TBR=msw@chromium.org Review URL: http://codereview.chromium.org/6894035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@82718 0039d316-1c4b-4281-b951-d872f2087c98
* Add NativeWidgetDelegate/Widget::OnKeyEvent post-IME handling.msw@chromium.org2011-04-221-8/+1
| | | | | | | | | | | | | Refactor XEvent code and InputMethodGtk::DispatchKeyEvent. Nix WidgetWin::GetFocusedViewRootView, rename RootView::OnKeyEvent. Cleanup headers and refactor code in extension_input_api.cc. BUG=72040 TEST=Key event handling in win/linux_views/touch; extension input API SendKeyboardEventInputFunction use. Review URL: http://codereview.chromium.org/6823055 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@82713 0039d316-1c4b-4281-b951-d872f2087c98
* Get rid of the set_delete_on_destroy setter now that we have CreateParams.ben@chromium.org2011-04-211-12/+13
| | | | | | | | BUG=72040 TEST=none Review URL: http://codereview.chromium.org/6883104 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@82486 0039d316-1c4b-4281-b951-d872f2087c98
* Make sure the device list is kept up-to-date.sadrul@chromium.org2011-04-201-0/+8
| | | | | | | | | | | | A device can be loaded at times after chrome has already started. So make sure the list of devices is kept up-to-date. BUG=none TEST=none Review URL: http://codereview.chromium.org/6877061 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@82316 0039d316-1c4b-4281-b951-d872f2087c98
* Don't store/restore focus when window is activated/deactivated on linux.oshima@google.com2011-04-071-0/+6
| | | | | | | | | | | | GTK can restore focus if the native widget has a focus, and views always remembers the focused_view, so there is no need to store/restore on linux for this case. Opening it (like wrench menu) was causing the issues in bugs because it changes window activation. BUG=70032,chromium-os:8829 TEST=see bugs TEST= Review URL: http://codereview.chromium.org/6691052 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80809 0039d316-1c4b-4281-b951-d872f2087c98
* Integrate the new input method API for Views into Chromium.suzhe@google.com2011-04-012-9/+14
| | | | | | | | | | | | | | | | | | This CL contains following changes: 1. Improve TextfieldViewsModel to support composition text. 2. Implement TextInputClient interface in NativeTextfieldViews. 3. Fix Textfield and native implementations to avoid calling TextfieldController::ContentsChanged() when the text is changed by calling Textfield::SetText() or AppendText(). 4. Fix a bug in FocusManager that causes NativeTextfieldViewsTest.FocusTraversalTest to fail. 5. Fix accelerator_handler_touch.cc to send key events to the top-level widget's input method instance instead of the root view. 6. Do the same fix in extension_input_api.cc. 7. Hook InputMethod into WidgetGtk and WidgetWin. BUG=75003 TEST=views_unittests --gtest_filter=NativeTextfieldViews* Review URL: http://codereview.chromium.org/6675005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80226 0039d316-1c4b-4281-b951-d872f2087c98