summaryrefslogtreecommitdiffstats
path: root/ui/views/view.cc
Commit message (Collapse)AuthorAgeFilesLines
* retry r258394estade@chromium.org2014-03-211-2/+7
| | | | | | | | | | | | | requestAutocomplete -- accept arbitrarily long street addresses This only fixes views. Mac will need to be updated as well (this change introduces ifdefs to leave the mac on its current behavior). BUG=335733 R=groby@chromium.org, sky@chromium.org Review URL: https://codereview.chromium.org/206473007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@258643 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 258394 "requestAutocomplete -- accept arbitrarily long st..."estade@chromium.org2014-03-201-7/+2
| | | | | | | | | | | | | | | | | | | caused android test failures > requestAutocomplete -- accept arbitrarily long street addresses > > This only fixes views. Mac will need to be updated as well (this change introduces ifdefs to leave the mac on its current behavior). > > BUG=335733 > R=groby@chromium.org, sky@chromium.org > > Review URL: https://codereview.chromium.org/196213003 TBR=estade@chromium.org Review URL: https://codereview.chromium.org/207033002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@258435 0039d316-1c4b-4281-b951-d872f2087c98
* requestAutocomplete -- accept arbitrarily long street addressesestade@chromium.org2014-03-201-2/+7
| | | | | | | | | | | This only fixes views. Mac will need to be updated as well (this change introduces ifdefs to leave the mac on its current behavior). BUG=335733 R=groby@chromium.org, sky@chromium.org Review URL: https://codereview.chromium.org/196213003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@258394 0039d316-1c4b-4281-b951-d872f2087c98
* Makes View::RecreateLayer() and Window::RecreateLayer() the samesky@chromium.org2014-03-191-7/+2
| | | | | | | | | | | | | In particular they both need to move all of the children from the old layer to the newly created layer. BUG=none TEST=covered by test now R=oshima@chromium.org Review URL: https://codereview.chromium.org/204793004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@258115 0039d316-1c4b-4281-b951-d872f2087c98
* Removes dependency of window_util on viewssky@chromium.org2014-03-111-4/+4
| | | | | | | | | | | | | | | | | | | | | | To do this I promoted RecreateLayer to LayerOwner. To make RecreateWindowLayers a bit less error prone it returns a scoper that owns the layer and all its descendants. Also nuked the set_bounds param passed to RecreateWindowLayers as it was always true. Made View::RecreateLayer and Window::RecreateLayer consistent in so far as they both set the bounds now. Previously Window didn't, but because we passed in true everywhere we used RecreateLayer I can make that change. BUG=none TEST=none R=ben@chromium.org Review URL: https://codereview.chromium.org/189723006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@256249 0039d316-1c4b-4281-b951-d872f2087c98
* Nuke use_acceleration_when_possiblesky@chromium.org2014-03-111-40/+15
| | | | | | | | | | | | It's now always true, so can be nuked. BUG=none TEST=none R=ben@chromium.org Review URL: https://codereview.chromium.org/193703002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@256196 0039d316-1c4b-4281-b951-d872f2087c98
* Nukes USE_AURA ifdefs from viewssky@chromium.org2014-03-101-20/+2
| | | | | | | | | | | | No longer needed. BUG=none TEST=none R=ben@chromium.org Review URL: https://codereview.chromium.org/191723003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@255976 0039d316-1c4b-4281-b951-d872f2087c98
* Remove Views dependency from window_animations.ccben@chromium.org2014-03-051-12/+10
| | | | | | | | | | | | | . Adds an "owner" property to Layer that identifies its LayerOwner. If a Layer is not owned by a LayerOwner that's OK - this property will be NULL. . Provides a more formal API to LayerOwner, e.g. SetLayer, which initializes the bound Layer's owner property. . Updates Window and View to use this new API. R=sky@chromium.org BUG=none Review URL: https://codereview.chromium.org/184983005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@255106 0039d316-1c4b-4281-b951-d872f2087c98
* Skia is disassociating information about the state of the clip from the clip ↵robertphillips@google.com2014-03-031-1/+2
| | | | | | | | | | | | | calls because this information isn't free for all backends. In particular, keeping track of the clip state for each clip call can get quite expensive for the GPU backend for small scenes. This CL updates the Canvas API to match where Skia will be moving to. At a higher level, how much does the short circuiting based on the clip state pay off for these call sites. If the benefit is marginal it may be worth removing the calls to IsClipEmpty. asvitkine@ for ui/gfx sky@ for ui/aura and ui/views Review URL: https://codereview.chromium.org/179983003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@254466 0039d316-1c4b-4281-b951-d872f2087c98
* Move ui/base/accessibility to ui/accessibility.dmazzoni@chromium.org2014-02-251-3/+3
| | | | | | | | | | | | | | | Gets rid of the enums defined in accessibility_types.h and switches to the enums defined in ui/accessibility/ax_enums.h, which are shared by "content". Eventually, content and views may share more common accessibility code, but moving to the same enums is a good first step. BUG=316726 R=piman@chromium.org, sky@chromium.org, tfarina@chromium.org Review URL: https://codereview.chromium.org/126763003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@253207 0039d316-1c4b-4281-b951-d872f2087c98
* Automatically repaint when a child view is added or going to be removed.pkasting@chromium.org2014-02-141-1/+7
| | | | | | | | | | BUG=333173 TEST=Changing between tabs with translate infobars for different source languages should redraw the infobars. R=sky@chromium.org Review URL: https://codereview.chromium.org/138143023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@251384 0039d316-1c4b-4281-b951-d872f2087c98
* views: Make View::set_border() take a scoped_ptr<>.erg@chromium.org2014-01-241-3/+1
| | | | | | | | | | | This makes the ownership situation much clearer. It also renames the function to SetBorder() (since it is not a simple accessor and can free previous instances of Border), and creates a Border::NullBorder() method (since "SetBorder(scoped_ptr<>())" is not clear). BUG=none R=sky@chromium.org Review URL: https://codereview.chromium.org/145033006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@246990 0039d316-1c4b-4281-b951-d872f2087c98
* Tweaks to get views compiling with mojosky@chromium.org2014-01-161-1/+1
| | | | | | | | | | | | | The one interesting bit is this makes mojo use the aura theme rather than the android theme. BUG=none TEST=none R=ben@chromium.org Review URL: https://codereview.chromium.org/139623002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@245141 0039d316-1c4b-4281-b951-d872f2087c98
* Reland Merge NativeTextfieldViews into views::Textfield.msw@chromium.org2014-01-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reverted in r244402 for Linux-Aura test failures. I fixed Ctrl+Shift+Delete/Backspace behavior on Linux here. Consolidate the split textfield code into Textfield. No behavior changes (except STYLE_LOWERCASE GetText nit). Use the underlying model's text and font_list storage. Remove unused code; rename TextfieldViewsModel::text(). Revise gesture and command handling. Skip NotifyAccessibilityEvent native behavior without widget. (No HWND for Views not yet added to view hierarchy) Make TouchEditable::GetNativeView const; avoids conflict. Fix includes, forward decls, Font[List] usage, tests. Ideas for followup cleanup and refactoring: -Cleanup View overrides decl/def order. -Refactor RemoveBorder, SetHorizontalMargins, etc. -Try to use composition instead of inheritance. -Remove textfield style ctor; refactor style code. -Remove STYLE_LOWERCASE functionality (one user). -Replace placeholder DrawStringRect with a Label view. -Cleanup CreateTouchSelectionControllerAndNotifyIt, etc. -Cleanup SetColor/SetTextColor, etc. BUG=131660 TEST=No textfield behavior/appearance regressions. TBR=sky@chromium.org Review URL: https://codereview.chromium.org/135863002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@244436 0039d316-1c4b-4281-b951-d872f2087c98
* Revert of https://codereview.chromium.org/120503005/msw@chromium.org2014-01-121-1/+1
| | | | | | | | | | | | | Reason for revert: views_unittest failures... :-( TBR=sky@chromium.org NOTREECHECKS=true NOTRY=true BUG=131660 Review URL: https://codereview.chromium.org/135813002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@244402 0039d316-1c4b-4281-b951-d872f2087c98
* Merge NativeTextfieldViews into views::Textfield.msw@chromium.org2014-01-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Consolidate the split textfield code into Textfield. No behavior changes (except STYLE_LOWERCASE GetText nit). Use the underlying model's text and font_list storage. Remove unused code; rename TextfieldViewsModel::text(). Revise gesture and command handling. Skip NotifyAccessibilityEvent native behavior without widget. (No HWND for Views not yet added to view hierarchy) Make TouchEditable::GetNativeView const; avoids conflict. Fix includes, forward decls, Font[List] usage, tests. Ideas for followup cleanup and refactoring: -Cleanup View overrides decl/def order. -Refactor RemoveBorder, SetHorizontalMargins, etc. -Try to use composition instead of inheritance. -Remove textfield style ctor; refactor style code. -Remove STYLE_LOWERCASE functionality (one user). -Replace placeholder DrawStringRect with a Label view. -Cleanup CreateTouchSelectionControllerAndNotifyIt, etc. -Cleanup SetColor/SetTextColor, etc. BUG=131660 TEST=No textfield behavior/appearance regressions. R=sky@chromium.org Review URL: https://codereview.chromium.org/120503005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@244377 0039d316-1c4b-4281-b951-d872f2087c98
* [View] Cleanup: Remove redundant layer()->SchedulePaint() callingsimonhong@chromium.org2014-01-071-8/+0
| | | | | | | | | | | | | layer()->SchedulePaint() is redundant call because SetLayerBounds() always triggers Layer::SchedulePaint(). R=ben@chromium.org BUG=NONE TEST=views_unittests Review URL: https://codereview.chromium.org/122333002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@243245 0039d316-1c4b-4281-b951-d872f2087c98
* Make extensions icons easier to target with gesturestdanderson@chromium.org2013-12-191-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The bounds of a BrowserActionView and the bounds of its child view |button_| have the following properties: - Both share a common center point. - The bounds of |button_| are square, but the bounds of BAV are not. - The bounds of |button_| are contained within the bounds of BAV. - Both are small enough to be easily covered by a finger. This is a flaw in rect-based targeting making it difficult to correctly target |button_| with a tap gesture. To obtain the desired behavior, use the distance between the center of the touch and the center of the view (instead of the center line of the view) to break ties among rect-based targeting candidates. The use of the distance to center line was to avoid biases against wide or tall views. But this is not necessary because any view which can have at least 60% of its area covered by a touch cannot be sufficiently wide or tall enough to benefit from such a metric. BUG=328182 Review URL: https://codereview.chromium.org/94003003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@241955 0039d316-1c4b-4281-b951-d872f2087c98
* Prefix string16 with base:: in ui/.dbeam@chromium.org2013-12-181-1/+1
| | | | | | | | | R=sky@chromium.org, tsepez@chromium.org BUG=329295 Review URL: https://codereview.chromium.org/117983002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@241625 0039d316-1c4b-4281-b951-d872f2087c98
* Rename View::set_focusable and View::set_accessibility_focusablemohsen@chromium.org2013-12-161-0/+14
| | | | | | | | | | | | | These functions are renamed to SetFocusable and SetAccessibilityFocusable, respectively, as a first step to add some functionality to them later. Later the view should give up focus if it has become unfocusable. BUG=323956 Review URL: https://codereview.chromium.org/103493005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@240888 0039d316-1c4b-4281-b951-d872f2087c98
* Use forward-declares of Border and Background in view.htapted@chromium.org2013-12-111-0/+9
| | | | | | | | | | | | | | The full header is required only for the possible call to the destructors via scoped_ptr::reset(). This CL moves the calls to reset() to the .cc to cut down on some dependencies and encourage some iwyu. BUG=None TBR=pfeldman@chromium.org TEST=No functional changes. Review URL: https://codereview.chromium.org/93883002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@239979 0039d316-1c4b-4281-b951-d872f2087c98
* Stop handling NULL source in views::View::ConvertPointToTarget() and ↵pkotwicz@chromium.org2013-12-071-25/+11
| | | | | | | | | | | | | | views::View::ConvertRectToTarget(). The reason for the CL is that the current code to handle a NULL source in views::View is wrong when the target has a rotation or a scale transform. BUG=None TEST=None R=sadrul@chromium.org, sky@chromium.org, xiyuan@chromium.org Review URL: https://codereview.chromium.org/71133002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@239341 0039d316-1c4b-4281-b951-d872f2087c98
* Removes FocusBorder from viewssky@chromium.org2013-12-051-15/+0
| | | | | | | | | | | | | | | | | | | | | | | This patch removes FocusBorder from View along with View::OnPaintFocusBorder. Views that want to render focus and that need to allow overriding get a Painter that is responsible for rendering the focus. Views that render focus differently must override OnFocus/OnBlur to SchedulePaint the necessary region. This patch simplifies View and cleans things up for views that don't ever want to paint focus, or paint focus differently (say TableView, or Textfield). On the down side it does mean any view that is focusable needs to override a few more additional methods. It was easy to get this wrong previously though as a common pattern is to override OnPaint and not invoke View::OnPaint. BUG=none TEST=none R=ben@chromium.org Review URL: https://codereview.chromium.org/105013002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238888 0039d316-1c4b-4281-b951-d872f2087c98
* events: Introduce EventTargeter.sadrul@chromium.org2013-12-021-0/+10
| | | | | | | | | | | | | | | | | EventTargeter will be used for finding the target for dispatching events in aura and views. More details about the design at the document linked at the bug. This patch introduces an EventTargeter interface, with an empty default implementation. It also adds some functions to the EventTarget interface that will be used by the actual EventTargeter implementation. BUG=318879 R=ben@chromium.org Review URL: https://codereview.chromium.org/98293002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238146 0039d316-1c4b-4281-b951-d872f2087c98
* Adds ability to control whether View::Focus()/Blur() schedules paintsky@chromium.org2013-11-211-4/+5
| | | | | | | | | | | | | | | | | | Currently Focus()/Blur() always schedules a paint. This is unnecessary for many views (WebView never draws focus for example). This patch adds the method NeedsSchedulePaintOnFocusBlur() that determines whether SchedulePaint() should be invoked. This also removes checking if focusable() or IsAccessibilityFocusable() before painting focus border, HasFocus() should be enough. BUG=313494 TEST=covered by test R=ben@chromium.org, sadrul@chromium.org Review URL: https://codereview.chromium.org/75413005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@236386 0039d316-1c4b-4281-b951-d872f2087c98
* Removes unnecessary SchedulePaints()sky@chromium.org2013-11-191-1/+0
| | | | | | | | | | | | | | | | | | | | | | This removes two unnecessary SchedulePaints() that are hit fairly often . View::SetBoundsRect: case of bounds not changing but needing layout. Child views already SchedulePaint if Layout() does something, so there should be no need for this call. . SingleSplitView::Layout() . Again, no need to ScheduledPaint() here as SingleSplitView doesn't paint anything if bounds of children change. I've added a test case for the first removal to make sure we don't the SchedulePaint() doesn't get added back. BUG=313494 TEST=covered by test R=ben@chromium.org Review URL: https://codereview.chromium.org/72073007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@235896 0039d316-1c4b-4281-b951-d872f2087c98
* events: Remove the bit to allow dispatching events to hidden targets.sadrul@chromium.org2013-11-091-1/+1
| | | | | | | | | | | | | This was introduced a while back for focus-change events. But events are not used for focus-change notifications anymore, and this flag is not used anywhere else. So remove it. BUG=none R=ben@chromium.org Review URL: https://codereview.chromium.org/67713002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@234114 0039d316-1c4b-4281-b951-d872f2087c98
* Add support for rect-based event targeting in viewstdanderson@google.com2013-11-051-7/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Views currently only supports point-based event targeting, meaning that the center point is the only location used when determining the target of a touch region. This can lead to a poor experience for touchscreen users because a touch can overlap many more possible targets than a mouse cursor and it is difficult to ensure that the center of the touch region is over the intended target (especially if that target is small, such as the tab close button). The goal of this patch is to add support for rect-based event targeting ("touch fuzzing") by using a heuristic to determine the most probable target of a rectangular region. This heuristic is implemented in View::GetEventHandlerForRect() by recursively looking for targets among the descendants of |this| which the touch region overlaps by at least 60% (and then returning the one that is closest to the location of the touch). If no such targets exist, instead return the target that would have been returned if point-based event targeting were used with the center point of the touch. The idea behind this approach is that small targets are more difficult to touch reliably than large targets, so small targets should get priority when determining the most probable target of a touch. In this patch, all of the overrides of View::GetEventHandlerForRect() (formerly View::GetEventHandlerForPoint()) simply call View::GetEventHandlerForPoint() directly if rect-based event targeting is to be used. The two exceptions are NotificationView and AutofillDialogViews::SectionContainer, for which I have preserved the existing point-based behavior for the time being (and have added TODOs to implement rect-based targeting in a follow up patch). BUG=129794,131208 TEST=ViewTest.GetEventHandlerForRect R=sky@chromium.org Review URL: https://codereview.chromium.org/22891016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@232891 0039d316-1c4b-4281-b951-d872f2087c98
* Modify hit test masks for tabs and tab close buttonstdanderson@chromium.org2013-11-041-2/+6
| | | | | | | | | | | | | | | | | In preparation for landing rect-based event targeting (issue 129794), the tab close button will need a hit test mask and the hit test mask for a tab will need to be modified. This will take into consideration the possibility where the tab close button of one tab is occluded by another tab when in stacked tab / touch layout mode. BUG=306186 TEST=TabStripTest.TabHitTestMaskWhenStacked Review URL: https://codereview.chromium.org/32463003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@232797 0039d316-1c4b-4281-b951-d872f2087c98
* Implement rect conversion utility functions in Viewtdanderson@chromium.org2013-10-211-0/+43
| | | | | | | | | | | | | | | Add the following utility functions (similar to their point-based counterparts): View::ConvertRectToTarget() View::ConvertRectToAncestor() View::ConvertRectFromAncestor() BUG=306182 Review URL: https://codereview.chromium.org/26884003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@229711 0039d316-1c4b-4281-b951-d872f2087c98
* More tooltip related cleanupsky@chromium.org2013-10-021-6/+4
| | | | | | | | | | | | | | | | . Make font loopup go through instance method (rather than static). . Consolidate trimming tooltip code. . Expose TooltipManager on Widget and use it. . Move TrimTooltipToFit from TooltipManager to TooltipManagerWin (only place that needs it). . Make TooltipManager::GetMaxWidth() match that of aura. R=ben@chromium.org BUG=292738 Review URL: https://codereview.chromium.org/25744002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@226602 0039d316-1c4b-4281-b951-d872f2087c98
* aura: Use Layer::SetShowPaintedContent to stop showing external contentdanakj@chromium.org2013-10-021-15/+0
| | | | | | | | | | | | | | | | | | | | | Currently we use SetExternalTexture(NULL) or SetDelegatedFrame(NULL) to switch back to showing painted content. This is kinda indirect, and won't play nicely when SetExternalTexture() is removed, and when we use a FrameProvider for delegated frames instead of pushing them to the ui::Layer directly one at a time. Instead, add SetShowPaintedContent() to switch to a content layer, and disallow setting a NULL/empty texture or delegated frame. Also View::SetExternalTexture() is not used, remove it so it doesn't have to think about this change. R=piman,sadrul BUG=263069 Review URL: https://codereview.chromium.org/25596002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@226502 0039d316-1c4b-4281-b951-d872f2087c98
* linux_aura: Flip the close button when it is the leftmost button.erg@chromium.org2013-10-011-26/+3
| | | | | | | | | | | The linux close button assets are designed to be flipped when they're on the left side of the screen. They were not being flipped properly. BUG=281788 Review URL: https://codereview.chromium.org/24855003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@226121 0039d316-1c4b-4281-b951-d872f2087c98
* Remove mac code from aura/ash/viewsoshima@chromium.org2013-09-181-4/+0
| | | | | | | | BUG=275898 Review URL: https://chromiumcodereview.appspot.com/23483041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@223839 0039d316-1c4b-4281-b951-d872f2087c98
* Makes native_widget_types forward declare ui::Cursor.sky@chromium.org2013-09-161-0/+4
| | | | | | | | | | | BUG=none TEST=none R=ben@chromium.org, jamesr@chromium.org TBR=jamesr@chromium.org Review URL: https://chromiumcodereview.appspot.com/23533057 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@223459 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor TransformPoint{,Reverse}.avallee@chromium.org2013-09-121-2/+2
| | | | | | | | | | | | These methods now take pointers instead of non-const references, this was previously a violation of the style guide. R=vollick@chromium.org BUG=160417 Review URL: https://chromiumcodereview.appspot.com/23724024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@222864 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes possible use after free when doing drag and drop.sky@chromium.org2013-08-261-13/+12
| | | | | | | | | | | | | | | Widget::RunShellDrag may spawn a nested message loop. This means it's entirely possible for 'this' to be deleted when the stack unwinds. There isn't a need for |currently_dragging_| as the Widget already maintains the View that initiaited the drag. BUG=275845 TEST=none R=erg@chromium.org Review URL: https://chromiumcodereview.appspot.com/22866022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@219600 0039d316-1c4b-4281-b951-d872f2087c98
* - Remove redundant views::View::accelerator_registration_delayed_pkotwicz@chromium.org2013-08-231-30/+9
| | | | | | | | | | | | - Remove unused parameters to views::View::NativeViewHierarchyChanged() - Split views::Widget::NotifyNativeViewHierarchyWillChange() into views::Widget::NotifyNativeViewHierarchyWillChange() and views::Widget::NotifyNativeViewHierarchyChanged() BUG=276729 TEST=ViewTest.NativeViewHierarchyChanged Review URL: https://chromiumcodereview.appspot.com/23068029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@219363 0039d316-1c4b-4281-b951-d872f2087c98
* linux_aura: Fix crash on drags from the omnibox.erg@chromium.org2013-08-151-0/+11
| | | | | | | | | | | | When we receive a mouse move event, there may be more events behind it in the queue. Prevent those further mouse events from also triggering a nested drag message loop. BUG=268797 Review URL: https://chromiumcodereview.appspot.com/22934007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@217757 0039d316-1c4b-4281-b951-d872f2087c98
* Introduces the const version of GetInputMethod().yukishiino@chromium.org2013-07-201-0/+5
| | | | | | | | | | | There are cases that we need the status of the input method, but no need to change it. This CL introduces {View,Widget}::GetInputMethod() const. TEST=none Review URL: https://chromiumcodereview.appspot.com/18238018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@212798 0039d316-1c4b-4281-b951-d872f2087c98
* Use a direct include of the message_loop header in ui/, part 2.avi@chromium.org2013-07-181-1/+1
| | | | | | | | | | BUG=260807 TEST=none TBR=ben@chromium.org Review URL: https://chromiumcodereview.appspot.com/19631002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@212291 0039d316-1c4b-4281-b951-d872f2087c98
* Hover effects in views should not be invoked when mouse events are disabledtdanderson@chromium.org2013-06-181-0/+18
| | | | | | | | | | | | | | | | | | | | | | Make an early return in Widget::OnMouseEvent() if mouse events are disabled, since in this case the mouse cursor is not visible and so no new hover effects should be invoked. Added the new helper function IsMouseEventsEnabled() to native_widget_*. This returns true for all native widget types except for native_widget_aura, where the cursor client is queried for the mouse event enabled state. Moved IsMouseHovered() to view.h. This function now returns false if either a) the mouse cursor is not within the view's bounds or, b) mouse events are disabled. BUG=239363 Review URL: https://chromiumcodereview.appspot.com/15738024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207097 0039d316-1c4b-4281-b951-d872f2087c98
* Add ContextMenuSourceType to ↵varunjain@chromium.org2013-06-181-5/+6
| | | | | | | | | | | | | views::ContextMenuController::ShowContextMenuForView. This will help bring context menu positioning logic to one place and unify the positioning logic for all views. BUG=239110 Review URL: https://chromiumcodereview.appspot.com/16979002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207019 0039d316-1c4b-4281-b951-d872f2087c98
* Use a direct include of strings headers in ui/, part 3.avi@chromium.org2013-06-111-1/+1
| | | | | | | | | | BUG=247723 TEST=none TBR=ben@chromium.org Review URL: https://chromiumcodereview.appspot.com/16757004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@205537 0039d316-1c4b-4281-b951-d872f2087c98
* Use a direct include of utf_string_conversions.h in ui/.avi@chromium.org2013-06-071-1/+1
| | | | | | | | | | BUG=none TEST=none TBR=ben@chromium.org Review URL: https://chromiumcodereview.appspot.com/16175008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@204885 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 203217 "Revert 202987 "Reorder the NativeViews attached t..."avi@chromium.org2013-05-311-10/+18
| | | | | | | | | | I reverted it yesterday because I thought it was burning the Aura tree. It turned out to be innocent so I'm putting it back. TBR=avi@chromium.org Review URL: https://codereview.chromium.org/16256004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@203402 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 202987 "Reorder the NativeViews attached to a view via th..."avi@chromium.org2013-05-301-18/+10
| | | | | | | | | | Suspected of burning the Aura bot to the ground. TBR=pkotwicz@chromium.org Review URL: https://codereview.chromium.org/15701017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@203217 0039d316-1c4b-4281-b951-d872f2087c98
* Reorder the NativeViews attached to a view via the kViewHostKey according to ↵pkotwicz@chromium.org2013-05-291-10/+18
| | | | | | | | | | | | the position of the view in the view hierarchy. BUG=237650 Test=NativeWidgetAuraTest.* Review URL: https://chromiumcodereview.appspot.com/15114002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@202987 0039d316-1c4b-4281-b951-d872f2087c98
* Make RecreateLayer() order the old layer above the new layer.pkotwicz@chromium.org2013-05-271-0/+6
| | | | | | | | This is required to stack layers with LayerOwners below layers without LayerOwners as per sky@'s suggestion in https://codereview.chromium.org/15114002/ Review URL: https://chromiumcodereview.appspot.com/15932003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@202457 0039d316-1c4b-4281-b951-d872f2087c98
* views: Store only the name of the class in kViewClassName constants.tfarina@chromium.org2013-05-261-1/+1
| | | | | | | | | | BUG=235984 R=jamescook@chromium.org,sky@chromium.org NOTRY=True Review URL: https://chromiumcodereview.appspot.com/15419002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@202355 0039d316-1c4b-4281-b951-d872f2087c98