summaryrefslogtreecommitdiffstats
path: root/views/view.h
Commit message (Collapse)AuthorAgeFilesLines
* Animate desktop rotations.ben@chromium.org2011-10-211-0/+1
| | | | | | | | | | . Adds a LayerDelegate method to notify of the end of an animation. BUG=none TEST=none Review URL: http://codereview.chromium.org/8364030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106658 0039d316-1c4b-4281-b951-d872f2087c98
* views: Make sure layer visibility is updated properly.sadrul@chromium.org2011-10-121-0/+6
| | | | | | | | | | | If a View without a layer is hidden, and one of its descendant views has a layer, then the layer also needs to be hidden. This also needs to be reversed when such a View is redisplayed. BUG=none TEST=ViewLayerTreesInSync, VisibilityChildLayers Review URL: http://codereview.chromium.org/8216027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105080 0039d316-1c4b-4281-b951-d872f2087c98
* Reorder Layers with NativeWidgetViews.backer@chromium.org2011-10-081-9/+9
| | | | | | | | | | | The presence of NativeWidgetViews complicates the process of keeping the Layer tree in sync with the View tree. Specifically, when walking up the View tree to find a View with a Layer, we may have to walk up through a NativeWidgetViews to a NativeWidgetView in a different View tree. Similarly, when walking down the tree to find Views with Layers, we may have to walk down through a NativeWidgetView to a NativeWidgetViews. BUG=none TEST=none Review URL: http://codereview.chromium.org/8201008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104654 0039d316-1c4b-4281-b951-d872f2087c98
* Keep the Layer tree in sync with View tree.backer@chromium.org2011-10-071-0/+9
| | | | | | | | | | | The View tree represents draw order, so it is imperative that order of the Layer tree reflect the order of the View tree. Whenever the order of the View tree changes, we now fix up the order of the Layer tree. BUG=none TEST=can change the stack order of windows on the views_desktop Review URL: http://codereview.chromium.org/8202001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104496 0039d316-1c4b-4281-b951-d872f2087c98
* layer: Resize a View's layer when the View is resized, even if it's not visible.sadrul@chromium.org2011-10-031-0/+4
| | | | | | | | | BUG=none TEST=manually Review URL: http://codereview.chromium.org/8102018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103788 0039d316-1c4b-4281-b951-d872f2087c98
* Reland the layer creation change since the touchui issues will be resolved ↵sadrul@chromium.org2011-10-031-43/+30
| | | | | | | | | | | | in a follow up CL. This reverts 103580 - Revert the layer creation change r103338 due to some issues with the keyboard on touch. I'll re-land later once I can get a working linux build.TBR=skyBUG=noneTEST=none Review URL: http://codereview.chromium.org/8100015 TBR=ben@chromium.org Review URL: http://codereview.chromium.org/8115010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103777 0039d316-1c4b-4281-b951-d872f2087c98
* Revert the layer creation change r103338 due to some issues with the ↵ben@chromium.org2011-09-301-30/+43
| | | | | | | | keyboard on touch. I'll re-land later once I can get a working linux build.TBR=skyBUG=noneTEST=none Review URL: http://codereview.chromium.org/8100015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103580 0039d316-1c4b-4281-b951-d872f2087c98
* Construct a View's layer immediately when SetPaintToLayer(true) is called or ↵ben@chromium.org2011-09-291-43/+30
| | | | | | | | when a transform is set.This eliminates the need for LayerHelper since it basically just served as a middle-man for caching layer state when a layer did not exist (which occurred when a view was invisible or not part of a view hierarchy).Also includes a fix to reorder layer children properly without crashing due to dropped textures.BUG=noneTEST=existing unittests Review URL: http://codereview.chromium.org/8054023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103338 0039d316-1c4b-4281-b951-d872f2087c98
* Improvements to debugging code which prints the views hierarchy.vollick@chromium.org2011-09-201-10/+16
| | | | | | | | | | BUG=None TEST=None Review URL: http://codereview.chromium.org/7906015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102011 0039d316-1c4b-4281-b951-d872f2087c98
* Make specifying a texture optional on a Layer.ben@chromium.org2011-09-191-1/+1
| | | | | | | | | | | | This is for Layers that participate in Draw() ordering, transforming and clipping, but do not themselves actually render anything. Also changes LayerTest to use RunAllPending() rather than using the weird QuitOnComposited test type I had. BUG=none TEST=see unittest Review URL: http://codereview.chromium.org/7941016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@101829 0039d316-1c4b-4281-b951-d872f2087c98
* wstring: remove wstrings from all tooltip-related codeevan@chromium.org2011-09-151-1/+1
| | | | | | | | | This is a nearly-mechanical translation of wstring to string16. Removes a *ton* of string conversions. Review URL: http://codereview.chromium.org/7886023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@101329 0039d316-1c4b-4281-b951-d872f2087c98
* Rework View Layer Draw() to use the Layer::DrawTree() method and the ↵ben@chromium.org2011-09-131-31/+15
| | | | | | | | | | LayerDelegate. http://crbug.com/93947 TEST=none Review URL: http://codereview.chromium.org/7845033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100961 0039d316-1c4b-4281-b951-d872f2087c98
* With this CL animated rotations can be triggered by visiting URLs like ↵vollick@chromium.org2011-09-081-0/+9
| | | | | | | | | | | about:rotate?right. The about handler fires orientation events that the TouchBrowserFrameView is listening for. When notified, the TBFV either rotates itself, or the views desktop (if it is active). The animation code lives in views/animation and knows nothing about sensors. BUG=none TEST=none Review URL: http://codereview.chromium.org/7273073 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100148 0039d316-1c4b-4281-b951-d872f2087c98
* Rename VIEWS_API to VIEWS_EXPORT.darin@chromium.org2011-08-051-1/+1
| | | | | | | R=rvargas@chromium.org Review URL: http://codereview.chromium.org/7550038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95651 0039d316-1c4b-4281-b951-d872f2087c98
* First pass for eliminating double paintingpkotwicz@chromium.org2011-07-291-0/+6
| | | | | | | | | | | | | | | | | | | | | | | A simple 3D CSS benchmark shows a 20% improvement in framerate on T25 hardware: an increase from about 30 fps to 36 fps. This is a first pass to getting rid of double painting by introducing a hole in layers Currently a layer which wants its parent not to paint under it will call SetParentLayerHoley There are a number of questions in terms of implementation: 1) We are doing this with layers. We are currently setting all layers to be holey if the touch_ui flag is enabled. Another option is to merge the holey functionality into regular layers. (Get rid of the holey layer subclass) 2) We are always generating vertices matrix, even in the ui::Layer case, is this ok? 3) We are wasting video memory. We are still uploading a full bitmap. I wasn't able to find a function call which would be able to efficiently slice the bigger bitmap, notably changing the origin of where the painting starts (texture upload) git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91848 0039d316-1c4b-4281-b951-d872f2087c98 BUG= TEST= Review URL: http://codereview.chromium.org/7330025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@94677 0039d316-1c4b-4281-b951-d872f2087c98
* Create views.dll / libviews.sodarin@chromium.org2011-07-281-1/+1
| | | | | | | 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
* views: Have the non-const version of child_at call the constant one.tfarina@chromium.org2011-07-261-3/+6
| | | | | | | | | | | BUG=72040 TEST=views_unittests, views_examples, views_desktop R=sky@chromium.org Review URL: http://codereview.chromium.org/7471048 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@94092 0039d316-1c4b-4281-b951-d872f2087c98
* Convert some more view methods to the ui/views style.ben@chromium.org2011-07-151-5/+13
| | | | | | | | 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
* views: Add unittests for View::GetViewsWithGroup() method.tfarina@chromium.org2011-07-131-5/+5
| | | | | | | | | | | | | 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
* Remove unused ContainsNativeView methods.ben@chromium.org2011-07-131-5/+0
| | | | | | | | | | BUG=none TEST=none TBR=sky Review URL: http://codereview.chromium.org/7352001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92305 0039d316-1c4b-4281-b951-d872f2087c98
* Gets compositor working for embedded widgets.sky@chromium.org2011-07-011-27/+31
| | | | | | | | | | BUG=none TEST=none R=ben@chromium.org Review URL: http://codereview.chromium.org/7280002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91312 0039d316-1c4b-4281-b951-d872f2087c98
* Convert the rect to the widget's coordinates correctly.sadrul@chromium.org2011-06-291-0/+4
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/7276053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90952 0039d316-1c4b-4281-b951-d872f2087c98
* Remove ifdef's for touchui stuff from events code.sadrul@chromium.org2011-06-281-6/+0
| | | | | | | | | | | Also, make sure the touch_pressed_handler_ is the view being removed before resetting it to NULL. BUG=none TEST=things compile and existing tests continue to pass Review URL: http://codereview.chromium.org/7276002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90762 0039d316-1c4b-4281-b951-d872f2087c98
* Moves acclerated painting related fields from View to LayerHelper.sky@chromium.org2011-06-271-23/+15
| | | | | | | | | | BUG=none TEST=none R=ben@chromium.org Review URL: http://codereview.chromium.org/7242025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90589 0039d316-1c4b-4281-b951-d872f2087c98
* Allow View to have a layer whose texture is updated externally.backer@chromium.org2011-06-241-0/+14
| | | | | | | | | | | This will be used to display texture produced by the GPU process for the RWHVV via the browser compositor. BUG=none TEST=none Review URL: http://codereview.chromium.org/7231012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90362 0039d316-1c4b-4281-b951-d872f2087c98
* Adds the ability to animate transforms/bounds to View.sky@chromium.org2011-06-231-2/+9
| | | | | | | | | | BUG=none TEST=none R=ben@chromium.org,wjmaclean@chromium.org Review URL: http://codereview.chromium.org/7242005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90254 0039d316-1c4b-4281-b951-d872f2087c98
* views: Pull out ContextMenuController class into its own header file.tfarina@chromium.org2011-06-231-31/+5
| | | | | | | | | | | BUG=72040 TEST=None R=ben@chromium.org,sky@chromium.org Review URL: http://codereview.chromium.org/7238006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90224 0039d316-1c4b-4281-b951-d872f2087c98
* views: Pull out DragController class into its own header file.tfarina@chromium.org2011-06-211-31/+5
| | | | | | | | | | | BUG=72040 TEST=None R=ben@chromium.org Review URL: http://codereview.chromium.org/7202015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89921 0039d316-1c4b-4281-b951-d872f2087c98
* Adds Layer as a class between View and the Texture.sky@chromium.org2011-06-211-28/+78
| | | | | | | | | | BUG=none TEST=none R=ben@chromium.org,wjmaclean@chromium.org Review URL: http://codereview.chromium.org/7189067 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89880 0039d316-1c4b-4281-b951-d872f2087c98
* Add View::ReorderChildView and Widget::MoveToTop.sadrul@chromium.org2011-06-161-0/+4
| | | | | | | | | | | | | | | | | | | | | The z-ordering of child views is currently maintained (implicitly?) by the order they are added to the parent view. It may often be necessary to change the z-order of views, and View::ReorderChildView can be used to do that. I changed views_desktop to have the two pure-views windows to have overlapping regions, and View::ReorderChildView is used to change the z-ordering of the two windows. So it is possible to click a window to activate it and bring it on top of the other. It could have been done without adding Widget::MoveToTop, but given Widget::MoveAbove and MoveAboveWidget, it sounded like a good idea to have Widget::MoveToTop (MoveToFront?). I do now know what the implementation for windows should be, though. So left it as NOTIMPLEMENTED. BUG=none TEST=none Review URL: http://codereview.chromium.org/7185005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89363 0039d316-1c4b-4281-b951-d872f2087c98
* Add NativeWidgetDelegate::OnTouchEvent and move views::View::TouchStatus to ↵sadrul@chromium.org2011-06-141-19/+5
| | | | | | | | | | | 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 the web content accessibility tree a descendant of the main window'sdmazzoni@chromium.org2011-06-131-10/+3
| | | | | | | | | | | | | | | | | | | 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-131-1/+0
| | | | | | | | 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: Drop the prefix "is_" from View::is_visible_ member variable.tfarina@chromium.org2011-06-111-1/+1
| | | | | | | | | | | | | | 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
* Remove COMPOSITOR_2 flag, old compositor code.wjmaclean@chromium.org2011-06-101-19/+0
| | | | | | | | | 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
* First draft to enable turning off compositor for unit tests.wjmaclean@chromium.org2011-06-091-0/+1
| | | | | | | | | | | 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
* Move more from Window onto Widget.ben@chromium.org2011-06-081-8/+0
| | | | | | | | 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
* Cleanup:pkasting@chromium.org2011-06-071-0/+1
| | | | | | | | | | | * 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
* Adds View::OnWillCompositeTexture that is invoked before a texture issky@chromium.org2011-06-061-0/+5
| | | | | | | | | | | | | | | | | | drawn by the compositor and Compositor::Blur to blur a region. If you want to blur a region, then you have to override OnWillCompositeTexture and invoke Blur. I considered adding an Effect enum that allows you to set BLUR on any view. I shied away from that as we may need blur to take a region, and I wasn't too happy about adding more to view. I can easily change it though. BUG=none TEST=none R=ben@chromium.org,wjmaclean@chromium.org Review URL: http://codereview.chromium.org/7056046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87989 0039d316-1c4b-4281-b951-d872f2087c98
* views: Take transforms into account when computing visible bounds.sadrul@chromium.org2011-06-061-3/+3
| | | | | | | | | BUG=none TEST=ViewTest.TransformVisibleBound, ViewTest.OnVisibleBoundsChanged Review URL: http://codereview.chromium.org/6993045 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87984 0039d316-1c4b-4281-b951-d872f2087c98
* views: Don't include the container type "vector" in the typedef ViewVector.tfarina@chromium.org2011-06-061-4/+4
| | | | | | | | | | | | | | | | - 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
* First draft of patch for setting texture_needs_updating_.wjmaclean@chromium.org2011-06-031-0/+13
| | | | | | | | | BUG= TEST= Review URL: http://codereview.chromium.org/7058019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87865 0039d316-1c4b-4281-b951-d872f2087c98
* views: Use ViewVector typedef instead of std::vector<View*> in view.*tfarina@chromium.org2011-06-031-2/+3
| | | | | | | | | | | BUG=72040,68682 TEST=None R=sky@chromium.org Review URL: http://codereview.chromium.org/7111008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87823 0039d316-1c4b-4281-b951-d872f2087c98
* views: Convert View::GetID/SetID functions to unix_hacker style.tfarina@chromium.org2011-06-031-4/+4
| | | | | | | | | | | 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: Fix some comments of the Tree View API.tfarina@chromium.org2011-06-031-13/+12
| | | | | | | | | | | BUG=None TEST=None R=sky@chromium.org Review URL: http://codereview.chromium.org/7088023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87731 0039d316-1c4b-4281-b951-d872f2087c98
* Adds ability for a view to paint to a texture even it if doesn't havesky@chromium.org2011-06-021-0/+9
| | | | | | | | | | | | a transform. BUG=none TEST=none R=ben@chromium.org,wjmaclean@chromium.org Review URL: http://codereview.chromium.org/7074048 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87701 0039d316-1c4b-4281-b951-d872f2087c98
* views: Make |focusable_| a private data member instead of a protected one.tfarina@chromium.org2011-06-021-3/+3
| | | | | | | | | | | BUG=72040 TEST=None R=ben@chromium.org Review URL: http://codereview.chromium.org/7020040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87555 0039d316-1c4b-4281-b951-d872f2087c98
* views: Make View::SetFocusable() a simple setter accessor.tfarina@chromium.org2011-06-011-1/+1
| | | | | | | | | | | 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
* views: Make View::GetVisibleBounds() a const method.tfarina@chromium.org2011-05-311-2/+1
| | | | | | | | | | | | | Note: This was a TODO for beng. BUG=72040 TEST=None R=ben@chromium.org Review URL: http://codereview.chromium.org/7083013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87312 0039d316-1c4b-4281-b951-d872f2087c98
* views: Make View::GetBaseline() a const method.tfarina@chromium.org2011-05-271-1/+1
| | | | | | | | | | | BUG=72040 TEST=None R=ben@chromium.org Review URL: http://codereview.chromium.org/7086008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87107 0039d316-1c4b-4281-b951-d872f2087c98