summaryrefslogtreecommitdiffstats
path: root/views/view.h
Commit message (Collapse)AuthorAgeFilesLines
* Fix some infobar drawing glitches:pkasting@chromium.org2011-04-161-0/+1
| | | | | | | | | | | * Glass mode popups used the wrong separator color, making the arrow look weird * The stroke/fill were not being drawn quite correctly due to some subtle AA-related issues BUG=none TEST=none Review URL: http://codereview.chromium.org/6875017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81846 0039d316-1c4b-4281-b951-d872f2087c98
* Some style changes (for readability).sadrul@chromium.org2011-04-141-0/+3
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/6675048 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81623 0039d316-1c4b-4281-b951-d872f2087c98
* New InputMethod api for Views.suzhe@google.com2011-03-311-0/+11
| | | | | | | | | | | | | | This CL adds: 1. Interfaces: InputMethod, InputMethodDelegate, TextInputClient. 2. InputMethodGtk: an InputMethod implementation based on GtkIMContext. 3. MockInputMethod: a mock InputMethod implementation for unit tests. BUG=75003 TEST=none Review URL: http://codereview.chromium.org/6688049 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80076 0039d316-1c4b-4281-b951-d872f2087c98
* Disambiguate OnMouseCaptureLost from OnMouseReleased.msw@chromium.org2011-03-291-5/+6
| | | | | | | | | | | | | Nix RenderWidgetHostViewViews' OnMouseCaptureLost forwarding. Consolidate code, remove unnecessary overrides, etc. Fix up test, |event| args, OVERRIDEs, and (c) dates. BUG=72040 TEST=Views mouse button release, cancelling mouse down/drag. Review URL: http://codereview.chromium.org/6685069 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79640 0039d316-1c4b-4281-b951-d872f2087c98
* Move some files from base to base/memory.levin@chromium.org2011-03-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | raw_scoped_refptr_mismatch_checker.h ref_counted.cc ref_counted.h ref_counted_memory.cc ref_counted_memory.h ref_counted_unittest.cc scoped_callback_factory.h scoped_comptr_win.h scoped_handle.h scoped_native_library.cc scoped_native_library.h scoped_native_library_unittest.cc scoped_nsobject.h scoped_open_process.h scoped_ptr.h scoped_ptr_unittest.cc scoped_temp_dir.cc scoped_temp_dir.h scoped_temp_dir_unittest.cc scoped_vector.h singleton.h singleton_objc.h singleton_unittest.cc linked_ptr.h linked_ptr_unittest.cc weak_ptr.cc weak_ptr.h weak_ptr_unittest.cc BUG=None TEST=Compile Review URL: http://codereview.chromium.org/6714032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79524 0039d316-1c4b-4281-b951-d872f2087c98
* Start working on compositor tree painting.sadrul@chromium.org2011-03-151-0/+23
| | | | | | | | | | | | | As a first step, maintain a skia canvas in each transformed view. Each transformed view will acquire a texture-id for the canvas it owns. Whenever the canvas is updated, it will trigger a refresh in the compositor tree. BUG=none TEST=none Review URL: http://codereview.chromium.org/6594125 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78149 0039d316-1c4b-4281-b951-d872f2087c98
* Clean up some event code:msw@chromium.org2011-03-141-10/+10
| | | | | | | | | | | Update some RootView event construction. Fixup some *MouseExited/OnLeaveNotify codepaths. Normalize event argument names. Move View::ConvertPoint*Ancestor defs to private section. Review URL: http://codereview.chromium.org/6685018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78121 0039d316-1c4b-4281-b951-d872f2087c98
* Remove NativeViewAccessibilityWin from the views namespace becausedmazzoni@chromium.org2011-03-141-4/+4
| | | | | | | | | | | VS2005 doesn't allow an ATL::CComObject symbol in a namespace. BUG=none TEST=build on VS2005, VS2008 Review URL: http://codereview.chromium.org/6685049 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78038 0039d316-1c4b-4281-b951-d872f2087c98
* Re-land: Refactor Views accessibility.dmazzoni@chromium.org2011-03-141-51/+15
| | | | | | | | | BUG=74988 TEST=none Review URL: http://codereview.chromium.org/6581010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78006 0039d316-1c4b-4281-b951-d872f2087c98
* This will help minimize the area we paint various views, including ↵davemoore@chromium.org2011-03-091-4/+4
| | | | | | | | | | | | | | | | | BrowserView in cros. Before the default when a child's preferred view size changed was to propagate it up and paint everything from the rootview down. This will limit the area to the parts that actually changed size. I expect we may find things that aren't being painted because they were assuming the behavior of Layout(). We should fix this as necessary. Also, a subsequent change will minimize our calls to SchedulePaint(). We frequently do it when we don't need to. BUG=None TEST=ViewTest.SetBoundsPaint Review URL: http://codereview.chromium.org/6531032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77481 0039d316-1c4b-4281-b951-d872f2087c98
* Make Window class concrete (mostly).ben@chromium.org2011-03-051-0/+1
| | | | | | | | | | | | Create NativeWindow/NativeWindowDelegate interfaces. BUG=72040 TEST=none TBR=sky Review URL: http://codereview.chromium.org/6626036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77006 0039d316-1c4b-4281-b951-d872f2087c98
* Do all OOLing in the views code. linux_views now builds clean with the clang ↵erg@google.com2011-03-041-23/+13
| | | | | | | | | | | plugin. BUG=carnitas TEST=compiles Review URL: http://codereview.chromium.org/6622002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76992 0039d316-1c4b-4281-b951-d872f2087c98
* Rename ContextMenuController::ShowContextMenu() to ShowContextMenuForView().thakis@chromium.org2011-03-041-3/+3
| | | | | | | | | | | | | | | For classes deriving from both View and ContextMenuController, this makes it clear which of method is overridden. Rename TabController::ShowContextMenu to ShowContextMenuForTab for the same reason. No intended functionality change. BUG=70465,72205 TEST=none TBR=beng git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76878 0039d316-1c4b-4281-b951-d872f2087c98
* Rename the methods in DragController.thakis@chromium.org2011-03-041-7/+8
| | | | | | | | | | | | | | | They used to have the same name as methods in View. Some views would derive from both View and DragController, which was confusing. For example for clang's -Woverride-virtual. No functionality change. BUG=70465,72205 TEST=none Review URL: http://codereview.chromium.org/6609033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76847 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 76825 - Refactor Views accessibility.jcivelli@chromium.org2011-03-041-15/+55
| | | | | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/6581010 TBR=dmazzoni@chromium.org Review URL: http://codereview.chromium.org/6612035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76844 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor Views accessibility.dmazzoni@chromium.org2011-03-031-55/+15
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/6581010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76825 0039d316-1c4b-4281-b951-d872f2087c98
* Use GetEventHandlerForPoint instead of GetViewForPoint.sadrul@chromium.org2011-02-251-8/+2
| | | | | | | | | 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
* views: Remove unused View::IsPushed() method.tfarina@chromium.org2011-02-251-4/+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
* Transformable views: Use the transformation for points and events.sadrul@chromium.org2011-02-241-20/+45
| | | | | | | | | | | | | 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
* Move some more direct uses of RootView to Widget.ben@chromium.org2011-02-241-4/+2
| | | | | | | | | | | | | | | | | | 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-241-14/+0
| | | | | | | | | | | | | 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-241-17/+7
| | | | | | | | | | | | | | | | | | | | 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
* Dramatically simplify view painting by getting rid of RootView's redundant ↵ben@chromium.org2011-02-231-9/+2
| | | | | | | | 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
* Remove usages of RootView from View by moving relevant RootView API methods ↵ben@chromium.org2011-02-181-4/+4
| | | | | | | | | | | | | 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
* Remove "visible bounds in root changed" functions from RootView, move them ↵ben@chromium.org2011-02-161-21/+22
| | | | | | | | | | | | | 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
* Rename ProcessPaint to Paint()ben@chromium.org2011-02-161-27/+27
| | | | | | | | | | | | 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-161-22/+16
| | | | | | | | | 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-151-1/+56
| | | | | | | | | | | 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
* Rename SchedulePaint(gfx::Rect..) to SchedulePaintInRectben@chromium.org2011-02-151-6/+5
| | | | | | | | | 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
* Migrate Event API methods to Google Style.ben@chromium.org2011-02-101-1/+1
| | | | | | | | | | | | | | Re-landing, moving the bits Mac uses to ui/base/events.h BUG=72040 TEST=none TBR=sky Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=74377 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74408 0039d316-1c4b-4281-b951-d872f2087c98
* Rework tree APIs to reflect Google style and more const-correctness.Also, ↵ben@chromium.org2011-02-091-43/+36
| | | | | | | | | | | move PrintViewHierarchy/PrintFocusHierarchy out into a separate header. BUG=72040 TEST=None Review URL: http://codereview.chromium.org/6452011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74244 0039d316-1c4b-4281-b951-d872f2087c98
* Clean up RTL methods.ben@chromium.org2011-02-081-56/+15
| | | | | | | | | | | | | | No one used the non-RTL version of GetBounds(), so I renamed it GetMirroredBounds() and got rid of the enum. Same for GetX(), consolidated with MirroredX() into GetMirroredX(). GetPosition() already took into account mirroring, so renamed GetMirroredPosition() for symmetry. Renamed the other functions to be getters. De-inlined a few that were doing complex looking stuff. http://crbug.com/72040 TEST=none Review URL: http://codereview.chromium.org/6334152 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74087 0039d316-1c4b-4281-b951-d872f2087c98
* Rework basic bounds methods on View to match new V2 API: ben@chromium.org2011-02-081-68/+56
| | | | | | | | | | | | | | | | SetBounds(const gfx::Rect& rect) -> SetBoundsRect(); DidChangeBounds()->OnBoundsChanged() GetLocalBounds(false)->GetLocalBounds() GetLocalBounds(true)->GetContentsBounds() Moved GetBounds(), GetX(), and GetPosition into RTL section. http://crbug.com/72040 TEST=none Review URL: http://codereview.chromium.org/6410109 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74052 0039d316-1c4b-4281-b951-d872f2087c98
* Change includes of gfx/* to ui/gfx/*sail@chromium.org2011-02-051-2/+2
| | | | | | | | | BUG=71063 TEST=compiled Review URL: http://codereview.chromium.org/6312156 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73890 0039d316-1c4b-4281-b951-d872f2087c98
* Sort the methods in views into sections, and make .cc order match .hben@chromium.org2011-02-051-539/+634
| | | | | | | | | | | | This is the first phase of upgrading views::View to the V2 API. BUG=none TEST=none TBR=sky Review URL: http://codereview.chromium.org/6413001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73881 0039d316-1c4b-4281-b951-d872f2087c98
* Only keep accelerators registered while the window is visibleasanka@chromium.org2011-02-021-0/+4
| | | | | | | | | BUG=69683 TEST=ViewTest.HiddenViewWithAccelerator Review URL: http://codereview.chromium.org/6271010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73473 0039d316-1c4b-4281-b951-d872f2087c98
* Move a bunch of random other files to src/ui/baseben@chromium.org2011-01-201-1/+5
| | | | | | | | | | 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
* touch: Return an enum from OnTouchEvent.sadrul@chromium.org2011-01-181-4/+16
| | | | | | | | | | | The enum returned from OnTouchEvent reflects the current status of the touch-sequence. This can be used by the RootView to determine when the touch-event-handler should be reset. BUG=none TEST=none Review URL: http://codereview.chromium.org/6347002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71677 0039d316-1c4b-4281-b951-d872f2087c98
* Remove wstring from views. Part 3: Switch accessibility strings to string16.avi@chromium.org2011-01-141-6/+6
| | | | | | | | | 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 OSExchangeData from src/app to src/ui/base/dragdropben@chromium.org2011-01-121-1/+3
| | | | | | | | | | 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
* Remove wstring from views. Part 1: Switch member variables to string16.avi@chromium.org2011-01-101-1/+1
| | | | | | | | | 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
* Removes unneeded forward declaration.sky@chromium.org2010-11-171-1/+0
| | | | | | | | | | BUG=none TEST=none TBR=ben@chromium.org Review URL: http://codereview.chromium.org/5145002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66385 0039d316-1c4b-4281-b951-d872f2087c98
* Some cleanup of view accessibility and view accessibility wrapper.ctguil@chromium.org2010-10-221-6/+5
| | | | | | | | | | | | | | | 1. Remove the ViewAccessibilityWrapper class. The view can directly manage it's ViewAccessibility. 2. Always use GetAccessibleForView to retrieve a view's associated accessibility object. This ensures that the correct accessibility object is returned for native view host objects. 3. Update get_accFocus to use FocusManager. 4. Move oleacc guid definitions to view_win.cc. BUG=none TEST=interactive_ui_tests:BrowserViewsAccessibilityTest.TestBrowserRootViewAccObj TEST=Manual: I can select the accessibility object of a native view host within AccExplorer32.exe. Review URL: http://codereview.chromium.org/4047001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63451 0039d316-1c4b-4281-b951-d872f2087c98
* Make accessible getters return values instead of accepting an output ↵ctguil@chromium.org2010-09-281-25/+13
| | | | | | | | | | | parameter. GetAccessibleName still needs to be converted. BUG=none TEST=trybots Review URL: http://codereview.chromium.org/3416033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60828 0039d316-1c4b-4281-b951-d872f2087c98
* Added entry points to view/View to dispatch and process TouchEvents.rjkroege@google.com2010-09-081-1/+14
| | | | | | | | | | | | This change is part of a series of changes to bring TouchEvent processing to views. BUG=na TESTED=compiled with and without touchui Review URL: http://codereview.chromium.org/3192002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58823 0039d316-1c4b-4281-b951-d872f2087c98
* Fixed error message bubbles according to the latest mocksdpolukhin@chromium.org2010-08-231-0/+3
| | | | | | | | | BUG=chromium-os:5762, chromium-os:5761 TEST=Enter wrong password on Chrome OS login screen. Review URL: http://codereview.chromium.org/3201003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57060 0039d316-1c4b-4281-b951-d872f2087c98
* Reland r54074.dtseng@chromium.org2010-07-301-1/+6
| | | | | | Review URL: http://codereview.chromium.org/3010040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54334 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 54074 - Add initial tests for keyboard access (tabbing in some dialogs).rohitrao@chromium.org2010-07-291-6/+1
| | | | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/3015026 TBR=dtseng@chromium.org Review URL: http://codereview.chromium.org/3046031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54093 0039d316-1c4b-4281-b951-d872f2087c98
* Add initial tests for keyboard access (tabbing in some dialogs).dtseng@chromium.org2010-07-281-1/+6
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/3015026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54074 0039d316-1c4b-4281-b951-d872f2087c98
* Make theme change notifications auto-propagate through the view hierarchy, ↵pkasting@chromium.org2010-07-271-9/+13
| | | | | | | | | | | | instead of forcing subclasses to manually call their superclass implementation. This fixes some problems where not all views would get notified of a theme change. Make naming for theme and locale changes consistent and clear. BUG=50107 TEST=none Review URL: http://codereview.chromium.org/2878055 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53736 0039d316-1c4b-4281-b951-d872f2087c98