summaryrefslogtreecommitdiffstats
path: root/views
Commit message (Collapse)AuthorAgeFilesLines
* Revert 89216 - Move private NativeWidget methods to new internal interface ↵ben@chromium.org2011-06-1526-468/+354
| | | | | | | | | | | | | | | 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-1526-354/+468
| | | | | | | | | | 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
* added right click check.shinyak@google.com2011-06-151-2/+2
| | | | | | | | | BUG=27882 TEST=Observe that right click works on the context menu on Windows. Review URL: http://codereview.chromium.org/6995152 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89170 0039d316-1c4b-4281-b951-d872f2087c98
* Convert the native separator to a regular view. Also, lighten it a bit in color.finnur@chromium.org2011-06-152-91/+14
| | | | | | | | BUG=59288 TEST=Open the page info bubble. The horizontal separator between sections should work as before. Review URL: http://codereview.chromium.org/7144018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89159 0039d316-1c4b-4281-b951-d872f2087c98
* Remove msvs_guids from third_party, webkit, tools and views.tony@chromium.org2011-06-141-1/+0
| | | | | | | | BUG=28727 Review URL: http://codereview.chromium.org/7146001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89100 0039d316-1c4b-4281-b951-d872f2087c98
* Use MouseWheelEvent for mouse wheel eventoshima@google.com2011-06-141-1/+1
| | | | | | | | | | | This is casted to MouseWheelEvent later in widget.cc BUG=none TEST=none Review URL: http://codereview.chromium.org/7146026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89092 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 89076 - Make sure custom frame windows paint as active when they're ↵ben@chromium.org2011-06-141-11/+11
| | | | | | | | | | | | | | | | | | | | | | | activated. Rationale for fix: The code in NativeWidgetWin::OnNCActivate schedules a paint for the entire non-client view if the window is visible because its activation state has changed and it'll doubtless require a repaint. A subsequent hack introduced by me to recover from the "other windows bleed through the UI" immediately forces a redraw, before the default WM_NCACTIVATE handler is called for the window. It seems that the window's active state is only set by or after the default WM_NCACTIVATE handler, so this hack redraw causes the window to just repaint itself as inactive since the state hasn't updated yet (and my earlier refactorings have made the frame ask Windows if the window is active rather than relying on custom cached state). So, to address this I moved the hack redraw from NativeWidgetWin::OnNCActivate to NativeWidgetWin::OnActivate, after the state and redraws should have happened. This corrects the issue for me. http://crbug.com/85791 TEST=see bug Review URL: http://codereview.chromium.org/7165003 TBR=ben@chromium.org Review URL: http://codereview.chromium.org/7168002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89089 0039d316-1c4b-4281-b951-d872f2087c98
* Add NativeWidgetDelegate::OnTouchEvent and move views::View::TouchStatus to ↵sadrul@chromium.org2011-06-1413-57/+77
| | | | | | | | | | | 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
* Make sure custom frame windows paint as active when they're activated.ben@chromium.org2011-06-141-11/+11
| | | | | | | | | | | | | | | | | | Rationale for fix: The code in NativeWidgetWin::OnNCActivate schedules a paint for the entire non-client view if the window is visible because its activation state has changed and it'll doubtless require a repaint. A subsequent hack introduced by me to recover from the "other windows bleed through the UI" immediately forces a redraw, before the default WM_NCACTIVATE handler is called for the window. It seems that the window's active state is only set by or after the default WM_NCACTIVATE handler, so this hack redraw causes the window to just repaint itself as inactive since the state hasn't updated yet (and my earlier refactorings have made the frame ask Windows if the window is active rather than relying on custom cached state). So, to address this I moved the hack redraw from NativeWidgetWin::OnNCActivate to NativeWidgetWin::OnActivate, after the state and redraws should have happened. This corrects the issue for me. http://crbug.com/85791 TEST=see bug Review URL: http://codereview.chromium.org/7165003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89076 0039d316-1c4b-4281-b951-d872f2087c98
* Widget::GetCurrentEvent() to get hold of the current input event being ↵sadrul@chromium.org2011-06-142-1/+55
| | | | | | | | | | | processed. BUG=none TEST=none Review URL: http://codereview.chromium.org/7144001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89074 0039d316-1c4b-4281-b951-d872f2087c98
* views: Use data member View::parent_ where possible instead of calling ↵tfarina@chromium.org2011-06-141-27/+23
| | | | | | | | | | | | | | | | View::parent() function. While I'm here: - Rewrite some while loops into for loops, since that is what they are doing anyway. BUG=72040 TEST=None R=sky@chromium.org Review URL: http://codereview.chromium.org/7046102 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89000 0039d316-1c4b-4281-b951-d872f2087c98
* NULL check this since it may be called after the delegate is NULL'ed out?ben@chromium.org2011-06-141-1/+4
| | | | | | | | BUG=84961 TEST=none Review URL: http://codereview.chromium.org/7145008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88997 0039d316-1c4b-4281-b951-d872f2087c98
* Make the web content accessibility tree a descendant of the main window'sdmazzoni@chromium.org2011-06-1318-106/+69
| | | | | | | | | | | | | | | | | | | accessibility tree again, which makes it possible to debug Chrome accessibility on Windows using tools like AccExplorer32 or AccProbe. This change refactors the code that retrieves the Windows IAccessible interface from a View that wraps a native HWND. The previous code was brittle, using ViewProps and hardcoded View classname tests. This change moves that logic directly to the classes that wrap native views. BUG=54220 BUG=85673 TEST=Updated AccessibilityWinBrowserTest.ContainsRendererAccessibilityTree Review URL: http://codereview.chromium.org/6995126 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88913 0039d316-1c4b-4281-b951-d872f2087c98
* Eliminate Window completely.ben@chromium.org2011-06-1362-1133/+428
| | | | | | | | 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
* Disables tooltips if we can't create the tooltip window. I still don'tsky@chromium.org2011-06-137-36/+26
| | | | | | | | | | | | | understand why we can't create tooltips for some folks, but this should at least keep us from crashing. BUG=82193 TEST=none R=ben@chromium.org Review URL: http://codereview.chromium.org/6995157 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88897 0039d316-1c4b-4281-b951-d872f2087c98
* Change profile menu button to avatar buttonsail@chromium.org2011-06-132-15/+15
| | | | | | | | | | | | | | | This change doesn't add any new functionality. It simply changes the profile menu button so that it now draws an avatar icon. Once this is checked in next steps will be to: - associate avatar icons to profiles - expand the profile menu BUG=None TEST=Ran on Windows and verified that things look ok. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=88683 Review URL: http://codereview.chromium.org/7003080 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88854 0039d316-1c4b-4281-b951-d872f2087c98
* Turn browser off by default on ChromeOS.wjmaclean@chromium.org2011-06-131-0/+4
| | | | | | | | | BUG=Browser compositor is on by default, not wanted at this time. TEST=None. Review URL: http://codereview.chromium.org/7046108 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88831 0039d316-1c4b-4281-b951-d872f2087c98
* Update rich touch information to conform to standardsadrul@chromium.org2011-06-133-71/+36
| | | | | | | | | | | | | | | | | W3C Touch Event standard (draft) https://dvcs.w3.org/hg/webevents/raw-file/tip/touchevents.html introduces RadiusX, RadiusY field for touch events. This patch makes views::TouchEvent to have corresonding fields and proper default value extracted from XEvent, and pass them from RWHVV to WebKit side. BUG=None TEST=None Review URL: http://codereview.chromium.org/7129008 Patch from Yufeng Shen <miletus@chromium.org>. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88830 0039d316-1c4b-4281-b951-d872f2087c98
* Add OVERRIDE to ui::TreeModelObserver overridden methods.tfarina@chromium.org2011-06-132-8/+10
| | | | | | | | | | | BUG=None TEST=None R=sky@chromium.org Review URL: http://codereview.chromium.org/7046093 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88827 0039d316-1c4b-4281-b951-d872f2087c98
* views: Use DCHECK_EQ where possible.tfarina@chromium.org2011-06-112-2/+3
| | | | | | | | | | | BUG=None TEST=None R=pkasting@chromium.org,sky@chromium.org Review URL: http://codereview.chromium.org/6995143 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88749 0039d316-1c4b-4281-b951-d872f2087c98
* views: Drop the prefix "is_" from View::is_visible_ member variable.tfarina@chromium.org2011-06-112-8/+8
| | | | | | | | | | | | | | No other boolean variable in the View class has the "is_" prefix and this is making me nervous for a while now :) BUG=72040 TEST=None R=ben@chromium.org Review URL: http://codereview.chromium.org/7104098 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88748 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 88683 - Change profile menu button to avatar buttonsail@chromium.org2011-06-102-15/+15
| | | | | | | | | | | | | | | | | This change doesn't add any new functionality. It simply changes the profile menu button so that it now draws an avatar icon. Once this is checked in next steps will be to: - associate avatar icons to profiles - expand the profile menu BUG=None TEST=Ran on Windows and verified that things look ok. Review URL: http://codereview.chromium.org/7003080 TBR=sail@chromium.org Review URL: http://codereview.chromium.org/7138003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88686 0039d316-1c4b-4281-b951-d872f2087c98
* Change profile menu button to avatar buttonsail@chromium.org2011-06-102-15/+15
| | | | | | | | | | | | | | This change doesn't add any new functionality. It simply changes the profile menu button so that it now draws an avatar icon. Once this is checked in next steps will be to: - associate avatar icons to profiles - expand the profile menu BUG=None TEST=Ran on Windows and verified that things look ok. Review URL: http://codereview.chromium.org/7003080 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88683 0039d316-1c4b-4281-b951-d872f2087c98
* Remove COMPOSITOR_2 flag, old compositor code.wjmaclean@chromium.org2011-06-107-107/+6
| | | | | | | | | BUG=none TEST=compiles, run manually Review URL: http://codereview.chromium.org/6975051 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88671 0039d316-1c4b-4281-b951-d872f2087c98
* Draw a NativeTextfieldViews drop location cursor.msw@chromium.org2011-06-105-56/+54
| | | | | | | | | | | | Move GetCursorBounds to NativeTextfieldViews. Some minor refactoring. BUG=72040 TEST=--use-pure-views textfield cursor showing drop location. Review URL: http://codereview.chromium.org/6982055 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88618 0039d316-1c4b-4281-b951-d872f2087c98
* views: Simplify View::RemoveAllChildViews() function implementation.tfarina@chromium.org2011-06-092-10/+14
| | | | | | | | | | | BUG=72040 TEST=views_unittests --gtest_filter=ViewTest.RemoveAllChildViews R=sky@chromium.org Review URL: http://codereview.chromium.org/7104096 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88608 0039d316-1c4b-4281-b951-d872f2087c98
* Disable animation for buttons on hover (r88176 and r88149).sadrul@chromium.org2011-06-091-0/+1
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/7104095 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88587 0039d316-1c4b-4281-b951-d872f2087c98
* Move last of event handlers down to NativeWidgetWin/Gtk.ben@chromium.org2011-06-0919-929/+767
| | | | | | | | BUG=72040 TEST=none Review URL: http://codereview.chromium.org/7129022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88564 0039d316-1c4b-4281-b951-d872f2087c98
* views: Add unittests for View::RemoveAllChildViews() method.tfarina@chromium.org2011-06-091-0/+33
| | | | | | | | | | | BUG=None TEST=None R=sky@chromium.org,pkasting@chromium.org Review URL: http://codereview.chromium.org/7046074 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88557 0039d316-1c4b-4281-b951-d872f2087c98
* views: STL iterator cleanups in View class.tfarina@chromium.org2011-06-091-18/+20
| | | | | | | | | | | | | | | - Standardize iterator naming to |i|. - Initialize them through constructor not assignment operator. - Declare iterators inside loops, not above them. BUG=72040 TEST=None R=pkasting@chromium.org,sky@chromium.org Review URL: http://codereview.chromium.org/7129028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88551 0039d316-1c4b-4281-b951-d872f2087c98
* views: Fix r88539 by renaming the variable from child_count to just count.tfarina@chromium.org2011-06-091-3/+3
| | | | | | | | | BUG=None TEST=None TBR=sky@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88540 0039d316-1c4b-4281-b951-d872f2087c98
* views: Use child_count() instead of static_cast<int>(...).tfarina@chromium.org2011-06-091-1/+1
| | | | | | | | | | | BUG=None TEST=None R=sky@chromium.org Review URL: http://codereview.chromium.org/7134028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88539 0039d316-1c4b-4281-b951-d872f2087c98
* Adding a new window type for frameless non-transient top level windows, used ↵ben@chromium.org2011-06-093-3/+18
| | | | | | | | | | by ChromeOS' window manager. BUG=chromium-os:16323 TEST=none Review URL: http://codereview.chromium.org/7129033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88523 0039d316-1c4b-4281-b951-d872f2087c98
* First draft to enable turning off compositor for unit tests.wjmaclean@chromium.org2011-06-094-1/+14
| | | | | | | | | | | Tests will be re-enabled when appropriate changes are made to support GL compositor testing. BUG=unit tests not ready for GL compositor at this time. TEST=unit tests run to completion. Review URL: http://codereview.chromium.org/7104039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88521 0039d316-1c4b-4281-b951-d872f2087c98
* Last views_unittests fix.ben@chromium.org2011-06-081-4/+6
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88397 0039d316-1c4b-4281-b951-d872f2087c98
* Turn on -Wdelete-non-virtual-dtor for chromeos as well.thakis@chromium.org2011-06-081-2/+2
| | | | | | | | | | | | All of the changes in this CL are to shut up the warning, not because of real problems (I fixed these in separate CLs). See the bug for a disussion of this change. BUG=84424 TEST=none Review URL: http://codereview.chromium.org/6995085 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88385 0039d316-1c4b-4281-b951-d872f2087c98
* views: Make MenuDelegate constructor virtual.thakis@chromium.org2011-06-082-0/+4
| | | | | | | | | | | | | | | This fixes a real bug, because e.g. chrome/browser/chromeos/frame/browser_view.cc has a scoped_ptr<views::MenuDelegate> that it sets to a SimpleMenuModelDelegateAdapter object. (That class ends up not having a destructor and no non-POD members, so it's just a latent bug.) BUG=84424 TEST=none Review URL: http://codereview.chromium.org/7109037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88383 0039d316-1c4b-4281-b951-d872f2087c98
* Fix remaining views_unittestsben@chromium.org2011-06-081-12/+12
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88370 0039d316-1c4b-4281-b951-d872f2087c98
* Fix views_unittests bustage.ben@chromium.org2011-06-081-1/+1
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88366 0039d316-1c4b-4281-b951-d872f2087c98
* Fix bustageben@chromium.org2011-06-081-1/+1
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88359 0039d316-1c4b-4281-b951-d872f2087c98
* Move more from Window onto Widget.ben@chromium.org2011-06-0838-890/+721
| | | | | | | | BUG=72040 TEST=none Review URL: http://codereview.chromium.org/7054052 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88356 0039d316-1c4b-4281-b951-d872f2087c98
* re-landing after clang fix. clang bot is red due to bus error in linker.oshima@google.com2011-06-082-18/+18
| | | | | | | | | | | | | | | | | | Wait showing html dialog until renderre finish painting after page is loaded. This change keeps track of state transition to make sure we only show the window on the paint after page load. minor change; use gdk's debug paint. Views no longer manage the damaged rect by itself so we can simply use gdk's debug paint. Note to mazda. Please consider adding fade-in animation. I believe it will make it much nicer. BUG=chromium-os:15809 TEST=open keyboard overlay on device. no white flicker should be observed. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=88271 Review URL: http://codereview.chromium.org/7024032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88345 0039d316-1c4b-4281-b951-d872f2087c98
* Convert NativeTextFieldViews context menu from Menu2 to MenuItemView.rhashimoto@chromium.org2011-06-083-25/+39
| | | | | | | | | | BUG=chromium-os:13887 TEST=none Review URL: http://codereview.chromium.org/7104013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88340 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 88271, this broke the clang build thusly:thakis@chromium.org2011-06-082-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | chrome/browser/chromeos/login/screen_locker.cc:225:16:error: 'ClearNativeFocus' marked 'override' but does not override any member functions virtual void ClearNativeFocus() OVERRIDE { ^ CXX(target) out/Debug/obj.target/browser/chrome/browser/chromeos/login/take_photo_view.o 1 error generated. Looks like a real bug in the CL. 88271 - Wait showing html dialog until renderre finish painting after page is loaded. This change keeps track of state transition to make sure we only show the window on the paint after page load. minor change; use gdk's debug paint. Views no longer manage the damaged rect by itself so we can simply use gdk's debug paint. Note to mazda. Please consider adding fade-in animation. I believe it will make it much nicer. BUG=chromium-os:15809 TEST=open keyboard overlay on device. no white flicker should be observed. Review URL: http://codereview.chromium.org/7024032 TBR=oshima@google.com Review URL: http://codereview.chromium.org/6995067 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88280 0039d316-1c4b-4281-b951-d872f2087c98
* Wait showing html dialog until renderre finish painting after page is loaded.oshima@google.com2011-06-082-19/+19
| | | | | | | | | | | | | | | This change keeps track of state transition to make sure we only show the window on the paint after page load. minor change; use gdk's debug paint. Views no longer manage the damaged rect by itself so we can simply use gdk's debug paint. Note to mazda. Please consider adding fade-in animation. I believe it will make it much nicer. BUG=chromium-os:15809 TEST=open keyboard overlay on device. no white flicker should be observed. Review URL: http://codereview.chromium.org/7024032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88271 0039d316-1c4b-4281-b951-d872f2087c98
* views: Use vector<T>::operator[] instead of vector<T>::at in the remaining ↵tfarina@chromium.org2011-06-084-14/+14
| | | | | | | | | | | | | | | | | | 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
* Reverse menu anchor position provided to views::MenuItemView for RTL languages.rhashimoto@chromium.org2011-06-072-3/+12
| | | | | | | | | | | | The GTK implementation of Menu2 reverses the menu alignment specified in RunMenuAt() if IsRTL() is true, i.e. TOPRIGHT becomes TOPLEFT and vice versa. This CL makes views::MenuItemView behave the same way. BUG=none TEST=none Review URL: http://codereview.chromium.org/7115005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88218 0039d316-1c4b-4281-b951-d872f2087c98
* Fix selection boundsoshima@google.com2011-06-071-1/+2
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/7046028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88196 0039d316-1c4b-4281-b951-d872f2087c98
* Fix touch compile after some button cleanup (r88149).sadrul@chromium.org2011-06-071-1/+1
| | | | | | | | BUG=none TEST=compile works with touchui TBR=pkasting@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88176 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup:pkasting@chromium.org2011-06-073-126/+112
| | | | | | | | | | | * Remove TextButton::has_normal_border(). Replaced it with some more generic functionality on TextButtonBorder to allow specifying a normal border. * Simplify InfoBarButtonBorder by making it a subclass of TextButtonBorder so it could avoid overriding anything unnecessary. This also required changing TextButtonBorder's Paint() function to stretch rather than tile, which I don't think should produce a visual difference for any buttons using that base class. BUG=none TEST=none Review URL: http://codereview.chromium.org/7065073 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88149 0039d316-1c4b-4281-b951-d872f2087c98