summaryrefslogtreecommitdiffstats
path: root/views
Commit message (Collapse)AuthorAgeFilesLines
* Dont update title window for chromeososhima@google.com2011-03-021-1/+5
| | | | | | | | | | | Chromeos doesn't use them, but this takes 10ms to update the title string BUG=chromium-os:8632 TEST=none Review URL: http://codereview.chromium.org/6574054 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76548 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting to fix builder redness. Please fix and reland.ananta@chromium.org2011-03-0223-451/+338
| | | | | | | | | | | | | | Revert 76483 - Remove/replace RootView/Widget getters with new NativeWidget getters. BUG=72040 TEST=existing unittests. Review URL: http://codereview.chromium.org/6598069 TBR=ben@chromium.org Review URL: http://codereview.chromium.org/6597099 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76508 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting to fix builder redness. Please reland with the fixes.ananta@chromium.org2011-03-021-2/+1
| | | | | | | | | | | | | Revert 76485 - Move typedef per review comment. oops! BUG=none TEST=none TBR=ben@chromium.org Review URL: http://codereview.chromium.org/6597098 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76507 0039d316-1c4b-4281-b951-d872f2087c98
* Move typedef per review comment. oops!ben@chromium.org2011-03-021-1/+2
| | | | | | | | BUG=none TEST=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76485 0039d316-1c4b-4281-b951-d872f2087c98
* Remove/replace RootView/Widget getters with new NativeWidget getters.ben@chromium.org2011-03-0223-338/+451
| | | | | | | | | BUG=72040 TEST=existing unittests. Review URL: http://codereview.chromium.org/6598069 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76483 0039d316-1c4b-4281-b951-d872f2087c98
* Parse ui::ET_MOUSEWHEEL on XEvent ButtonRelease and XI_ButtonRelease too.msw@chromium.org2011-03-011-1/+5
| | | | | | | | | BUG=72040 TEST=none Review URL: http://codereview.chromium.org/6596047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76358 0039d316-1c4b-4281-b951-d872f2087c98
* Fix build errors with latest ibusyusukes@google.com2011-02-281-5/+5
| | | | | | | | | | BUG=none TEST=Linux desktop Review URL: http://codereview.chromium.org/6597012 Patch from Peng Huang <penghuang@chromium.org>. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76277 0039d316-1c4b-4281-b951-d872f2087c98
* Fix setting cursor for WidgetGtk.sadrul@chromium.org2011-02-281-2/+4
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/6591028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76226 0039d316-1c4b-4281-b951-d872f2087c98
* Fix various layered window updating bugs.ben@chromium.org2011-02-272-34/+52
| | | | | | | | | | | | | | | | As it turns out, you can NOT rely on Windows to track the invalid rect for layered windows. This is likely because Windows doesn't believe them to have an invalid rect - it is up to the app to handle updating them. So, sadly, this means adding an invalid_rect_ field to WidgetWin and using it to track the invalid rect instead of InvalidateRect() - but only for WS_EX_LAYERED. I also split the layered window updating code out of RedrawInvalidRect for readability. http://crbug.com/74300 http://crbug.com/74301 TEST=see bugs TBR=sky Review URL: http://codereview.chromium.org/6591027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76172 0039d316-1c4b-4281-b951-d872f2087c98
* Reorder functions.ben@chromium.org2011-02-262-248/+231
| | | | | | | | | | BUG=72040 TEST=none TBR=sky Review URL: http://codereview.chromium.org/6594033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76169 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a paintstorm that was starving input events and causing things like freezes.ben@chromium.org2011-02-251-31/+27
| | | | | | | | | http://crbug.com/74043 TEST=see bug Review URL: http://codereview.chromium.org/6588021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76103 0039d316-1c4b-4281-b951-d872f2087c98
* Use GetEventHandlerForPoint instead of GetViewForPoint.sadrul@chromium.org2011-02-2511-39/+28
| | | | | | | | | BUG=74121 TEST=none Review URL: http://codereview.chromium.org/6575050 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76102 0039d316-1c4b-4281-b951-d872f2087c98
* Hook up empty interfaces for NativeWidget/NativeWidgetDelegate.ben@chromium.org2011-02-259-11/+93
| | | | | | | | | | | These will be filled out in subsequent changelists to isolate the communication between Widget and WidgetWin/Gtk. BUG=72040 TEST=existing Review URL: http://codereview.chromium.org/6596013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76100 0039d316-1c4b-4281-b951-d872f2087c98
* Move RootView construction, DefaultThemeProvider construction, and ↵ben@chromium.org2011-02-256-246/+139
| | | | | | | | | | | FocusTraversable implementation to Widget base class. BUG=72040 TEST=existing Review URL: http://codereview.chromium.org/6591009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76063 0039d316-1c4b-4281-b951-d872f2087c98
* Fix layered windows. use_layered_buffer_ was not being correctly intialized ↵ben@chromium.org2011-02-252-10/+1
| | | | | | | | | | | | | | before LayoutRootView() was called in OnCreate(). Also remove unused opaque()/opaque_ member. http://crbug.com/74141 http://crbug.com/74126 TEST=see bugs TBR=sky git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76051 0039d316-1c4b-4281-b951-d872f2087c98
* touchui: Fix building on a buildbot.sadrul@chromium.org2011-02-251-2/+4
| | | | | | TBR=msw@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76047 0039d316-1c4b-4281-b951-d872f2087c98
* Attempt at fixing memory increase from earlier painting changes. Default ↵ben@chromium.org2011-02-251-1/+1
| | | | | | | | | | | value for use_layered_buffer_ was causing us to allocate a layered buffer for every widget (!), even if they were subsequently set to non-layered. BUG=none TEST=page cycler TBR=sky Review URL: http://codereview.chromium.org/6594004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76030 0039d316-1c4b-4281-b951-d872f2087c98
* views: Move the implementation of MenuExample to the source file.tfarina@chromium.org2011-02-253-181/+229
| | | | | | | | | BUG=None TEST=run out/Debug/views_examples, everything should works as before. Review URL: http://codereview.chromium.org/6548001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76025 0039d316-1c4b-4281-b951-d872f2087c98
* Make Widget non-abstract.ben@chromium.org2011-02-253-52/+214
| | | | | | | | | | BUG=72040 TEST=none TBR=sky Review URL: http://codereview.chromium.org/6574052 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76022 0039d316-1c4b-4281-b951-d872f2087c98
* views: Remove unused View::IsPushed() method.tfarina@chromium.org2011-02-252-6/+0
| | | | | | | | | BUG=None TEST=trybots Review URL: http://codereview.chromium.org/6579039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76006 0039d316-1c4b-4281-b951-d872f2087c98
* Update LocatedEvent and MouseWheelEvent.msw@chromium.org2011-02-2513-147/+255
| | | | | | | | | | | | | | | Refactor RootView::OnMouseWheel and WidgetGtk::ProcessScroll. Rename RootView's and MenuHostRootView's ProcessMouseWheelEvent to OnMouseWheel. Merge event_x's GetMouseEventType into EventTypeFromNative and detect wheel events. Update NativeWidgetWin::MakeMSG and WidgetWin::MakeMSG. Add some needed support functions. BUG=72040 TEST=none Review URL: http://codereview.chromium.org/6469106 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76001 0039d316-1c4b-4281-b951-d872f2087c98
* Remove NativeWidgetWin/WidgetImpl again. I'm going to take a different ↵ben@chromium.org2011-02-2411-1950/+0
| | | | | | | | | | | | | | approach to extracting this stuff. BUG=72040 TEST=none TBR=sky Review URL: http://codereview.chromium.org/6574043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75995 0039d316-1c4b-4281-b951-d872f2087c98
* These files were meant to go with my change here ↵ben@chromium.org2011-02-242-5/+5
| | | | | | | | | | | http://codereview.chromium.org/6577017 BUG=72040 TEST=none TBR=sky git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75983 0039d316-1c4b-4281-b951-d872f2087c98
* Fix dragged tab visiblity bug by making the Widget invalidate everything for ↵ben@chromium.org2011-02-241-0/+6
| | | | | | | | | | | | | layered windows when they are shown. This is because InvalidateRect calls when a window is invisible are ignored by Windows. http://crbug.com/60204 TEST=see bug Review URL: http://codereview.chromium.org/6579046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75981 0039d316-1c4b-4281-b951-d872f2087c98
* Fix compile on windows.sadrul@chromium.org2011-02-241-2/+2
| | | | | | TBR=ben@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75966 0039d316-1c4b-4281-b951-d872f2087c98
* Transformable views: Use the transformation for points and events.sadrul@chromium.org2011-02-248-94/+358
| | | | | | | | | | | | | Added and updated API for converting points between views' coordinate systems, taking transformations into consideration. This in turn gives us, for free, transformation for located events (mouse events, touch events). BUG=none TEST=ViewTest.TransformEvent Review URL: http://codereview.chromium.org/6534015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75960 0039d316-1c4b-4281-b951-d872f2087c98
* Change tabs to spaces in views/views.gypwyck@chromium.org2011-02-241-2/+2
| | | | | | | | | | | There were a couple of tabs where there should be spaces in views.gyp. BUG=None TEST=None Review URL: http://codereview.chromium.org/6578006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75943 0039d316-1c4b-4281-b951-d872f2087c98
* Move some more direct uses of RootView to Widget.ben@chromium.org2011-02-2416-42/+81
| | | | | | | | | | | | | | | | | | The idea is to remove RootView from the public API of Views and eventually move it into the internal namespace. It is really an implementation detail of event propagation into a view hierarchy. Anyone that calls GetRootView() and does something that isn't a View method should be calling that method on the Widget instead... e.g. instead of calling GetRootView()->NotifyThemeChanged(), call GetWidget()->ThemeChanged(). The RootView is a focus traversable, which is fine, but calling code should call GetWidget()->GetFocusTraversable() to obtain it, rather than knowing RootView is-a focus traversable and just calling GetRootView(). This also changes FocusManager::ContainsView to be simpler and cross platform. Since there is one FocusManager per view hierarchy (attached to the toplevel Widget), getting the view's focus manager and comparing it to the current focus manager is a sufficient test. BUG=72040 TEST=existing unittests, none Review URL: http://codereview.chromium.org/6577017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75940 0039d316-1c4b-4281-b951-d872f2087c98
* views: Factor out from View class some metric functions and constants into ↵tfarina@chromium.org2011-02-2411-43/+88
| | | | | | | | | | | | | its own files. (Note: This was a TODO for ben to move to metrics.h) BUG=None TEST=trybots Review URL: http://codereview.chromium.org/6577004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75841 0039d316-1c4b-4281-b951-d872f2087c98
* Rename WillGain/Lose/DidGainFocus, Focus methods. Now there are only two ↵ben@chromium.org2011-02-2443-344/+283
| | | | | | | | | | | | | | | | | | | | notifications: OnFocus() OnBlur() View gains a Focus()/Blur() processing method pair. Cleans up code in FocusManager::SetFocusedView. Also adds OVERRIDE to a bunch of methods. BUG=72040 TEST=existing unittests. Review URL: http://codereview.chromium.org/6577010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75830 0039d316-1c4b-4281-b951-d872f2087c98
* Fix ViewTest.MouseEvent by NULL checking widget_ in WidgetGtk::SetCursor.ben@chromium.org2011-02-232-2/+3
| | | | | | | | | | BUG=none TEST=re-enables MouseEvent. TBR=sky Review URL: http://codereview.chromium.org/6575010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75811 0039d316-1c4b-4281-b951-d872f2087c98
* temporarily disable ViewTest.MouseEvent while I fix.ben@chromium.org2011-02-231-1/+1
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75809 0039d316-1c4b-4281-b951-d872f2087c98
* Remove depricated arg |urgent| from SchedulePaintInRect calls.msw@chromium.org2011-02-231-1/+1
| | | | | | | | | BUG=73919 TEST=build Chrome with toolkit_views and touchui GYP_DEFINES. Review URL: http://codereview.chromium.org/6579010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75799 0039d316-1c4b-4281-b951-d872f2087c98
* More RootView cleanup:ben@chromium.org2011-02-2315-143/+88
| | | | | | | | | | | | | | - SetCursor->Widget API, remove platform ifdefs from root_view.cc for cursor updating - Remove weird native focus stuff, only used by ScrollView and seems not to have any effect on old options window. This is the sort of thing that should be handled by FocusManager anyway. - Remove DefaultKeyboardHandler concept in RootView. It does seem useful, but it's broken currently, and only ScrollView uses it (and hence only the old options window, which is not long for this earth). I would like to eventually replace this with a more generalized pre-processing/hierarchy processing/post-processing based event handling design. - Add OVERRIDE to RootView overrides. BUG=72040 TEST=none Review URL: http://codereview.chromium.org/6584001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75786 0039d316-1c4b-4281-b951-d872f2087c98
* Fix glitch in menu painting due to incorrect override.ben@chromium.org2011-02-231-1/+1
| | | | | | | | | http://crbug.com/73793 TEST=none Review URL: http://codereview.chromium.org/6577001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75770 0039d316-1c4b-4281-b951-d872f2087c98
* Dramatically simplify view painting by getting rid of RootView's redundant ↵ben@chromium.org2011-02-2324-677/+186
| | | | | | | | knowledge of invalid rects.The OS is capable of doing this for us (see: InvalidateRect, etc.), so we should just defer to it.I was also able to remove all of the custom logic in WindowWin::OnNCPaint and replace it with a simple SetMsgHandled check.http://crbug.com/72040TEST=none Review URL: http://codereview.chromium.org/6469096 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75758 0039d316-1c4b-4281-b951-d872f2087c98
* Use ResourceBundle::BaseFont for GTK tooltips.falken@chromium.org2011-02-231-1/+1
| | | | | | | | | | | | If no font is specified, the font used can differ from the base font. This happens when we set the UI font manually using IDS_UI_FONT_FAMILY_CROS. BUG=chromium-os:7737 TEST=manually tested on netbook and Linux Review URL: http://codereview.chromium.org/6476023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75719 0039d316-1c4b-4281-b951-d872f2087c98
* views: Remove Controller interface.tfarina@chromium.org2011-02-233-73/+8
| | | | | | | | | BUG=None TEST=None Review URL: http://codereview.chromium.org/6532083 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75712 0039d316-1c4b-4281-b951-d872f2087c98
* views: Move the remaining layout constants to the views namespace. Final Part.tfarina@chromium.org2011-02-231-5/+2
| | | | | | | | | BUG=None TEST=trybots Review URL: http://codereview.chromium.org/6538076 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75703 0039d316-1c4b-4281-b951-d872f2087c98
* Remove usages of RootView from View by moving relevant RootView API methods ↵ben@chromium.org2011-02-1817-191/+201
| | | | | | | | | | | | | to Widget. This results in some code duplication right now but this will be mitigated once all platforms use WidgetImpl. http://crbug.com/72040 TEST=existing tests Review URL: http://codereview.chromium.org/6507028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75431 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 75347 - Revert 75306 - Force native frames to repaint when ↵mirandac@chromium.org2011-02-181-12/+11
| | | | | | | | | | | | | | | | | | | OnNCActivate is called. With a profile menu button added to the GlassBrowserFrameView, failure to trigger the frame repaint means that the button will remain in the active state even when the frame has been deactivated. DesktopNotification tests failing on win full - speculative revert since this is the only CL in the range that seems possibly related. BUG=none TEST=frames behave normally in Aero mode, when activated and deactivated. Review URL: http://codereview.chromium.org/6507044 TBR=mirandac@chromium.org Review URL: http://codereview.chromium.org/6546006 TBR=mattm@chromium.org Review URL: http://codereview.chromium.org/6541023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75389 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 75306 - Force native frames to repaint when OnNCActivate is called. ↵mattm@chromium.org2011-02-181-11/+12
| | | | | | | | | | | | | | | | With a profile menu button added to the GlassBrowserFrameView, failure to trigger the frame repaint means that the button will remain in the active state even when the frame has been deactivated. DesktopNotification tests failing on win full - speculative revert since this is the only CL in the range that seems possibly related. BUG=none TEST=frames behave normally in Aero mode, when activated and deactivated. Review URL: http://codereview.chromium.org/6507044 TBR=mirandac@chromium.org Review URL: http://codereview.chromium.org/6546006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75347 0039d316-1c4b-4281-b951-d872f2087c98
* Force native frames to repaint when OnNCActivate is called. With a profile ↵mirandac@chromium.org2011-02-171-12/+11
| | | | | | | | | | | menu button added to the GlassBrowserFrameView, failure to trigger the frame repaint means that the button will remain in the active state even when the frame has been deactivated. BUG=none TEST=frames behave normally in Aero mode, when activated and deactivated. Review URL: http://codereview.chromium.org/6507044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75306 0039d316-1c4b-4281-b951-d872f2087c98
* Remove "visible bounds in root changed" functions from RootView, move them ↵ben@chromium.org2011-02-167-119/+160
| | | | | | | | | | | | | to View. Clean up the API a little. Adds a BoundsChanged() processing function to View that does default processing for bounds-changed events, including notifying the view via OnBoundsChanged() and potentially notifying of visible bounds changing. Adds a unit test for OnVisibleBoundsChanged. http://crbug.com/72040 TEST=unit test Review URL: http://codereview.chromium.org/6534001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75182 0039d316-1c4b-4281-b951-d872f2087c98
* Fix SkRectToRect.sadrul@chromium.org2011-02-161-5/+1
| | | | | | | | | BUG=none TEST=RectTest.SkRectToRect Review URL: http://codereview.chromium.org/6525031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75159 0039d316-1c4b-4281-b951-d872f2087c98
* Rename ProcessPaint to Paint()ben@chromium.org2011-02-1611-80/+88
| | | | | | | | | | | | Make OnPaint* methods protected. http://crbug.com/72040 TEST=none TBR=sky Review URL: http://codereview.chromium.org/6529037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75063 0039d316-1c4b-4281-b951-d872f2087c98
* Rename Paint* -> OnPaint*ben@chromium.org2011-02-1650-102/+96
| | | | | | | | | http://crbug.com/72040 TEST=none TBR=sky Review URL: http://codereview.chromium.org/6499030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75033 0039d316-1c4b-4281-b951-d872f2087c98
* views transformation: First cut.sadrul@chromium.org2011-02-154-6/+179
| | | | | | | | | | | This is a first cut at the transformable views. Skia transformation matrices are used to apply transformation (rotate, scale, translation). Support for clipping is also added (but not through the matrix). Currently, the transformation is applied only for painting. A future CL will apply the transformation for various events. BUG=none TEST=ViewTest.TransformPaint Review URL: http://codereview.chromium.org/6500008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75023 0039d316-1c4b-4281-b951-d872f2087c98
* Sort methods in RootView cc/h. Add better documentation and outline future ↵ben@chromium.org2011-02-152-556/+529
| | | | | | | | | | | | plans. http://crbug.com/72040 TEST=none TBR=sky Review URL: http://codereview.chromium.org/6525024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75018 0039d316-1c4b-4281-b951-d872f2087c98
* Rename SchedulePaint(gfx::Rect..) to SchedulePaintInRectben@chromium.org2011-02-1513-25/+24
| | | | | | | | | http://crbug.com/72040 TEST=existing tests Review URL: http://codereview.chromium.org/6480076 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74987 0039d316-1c4b-4281-b951-d872f2087c98