summaryrefslogtreecommitdiffstats
path: root/ui/base/cursor/cursor_loader.h
Commit message (Collapse)AuthorAgeFilesLines
* Cleanup: Update the path to insets and point headers.tfarina2014-12-231-1/+1
| | | | | | | | | | | | | The geometry headers were moved from /ui/gfx/ to ui/gfx/geometry, so we are updating the include paths to fix this. BUG=395370 TEST=unit_tests, content_unittests, extensions_unittests ... TBR=sky@chromium.org,danakj@chromium.org Review URL: https://codereview.chromium.org/823703003 Cr-Commit-Position: refs/heads/master@{#309523}
* Use platform's device scale factor for cursor instead of gfx::Display ↵oshima@chromium.org2014-04-231-10/+8
| | | | | | | | | | | | | | | | | because gfx::Display's DSF may differ from platform's one when UI scaling is used. BUG=361672 TEST=covered by unit test Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=265592 R=sky@chromium.org, tdanderson@chromium.org Review URL: https://codereview.chromium.org/226293005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@265747 0039d316-1c4b-4281-b951-d872f2087c98
* Revert of Use platform's device scale factor for cursor ↵pfeldman@chromium.org2014-04-231-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | (https://codereview.chromium.org/226293005/) Reason for revert: There are no resize cursors in DevTools on Linux Aura anymore. Original issue's description: > Use platform's device scale factor for cursor instead of gfx::Display because gfx::Display's DSF may differ from > platform's one when UI scaling is used. > > BUG=361672 > TEST=covered by unit test > > Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=265592 TBR=tdanderson@chromium.org,sky@chromium.org,oshima@chromium.org NOTREECHECKS=true NOTRY=true BUG=361672 Review URL: https://codereview.chromium.org/249303002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@265625 0039d316-1c4b-4281-b951-d872f2087c98
* Use platform's device scale factor for cursor instead of gfx::Display ↵oshima@chromium.org2014-04-231-8/+6
| | | | | | | | | | | | | because gfx::Display's DSF may differ from platform's one when UI scaling is used. BUG=361672 TEST=covered by unit test Review URL: https://codereview.chromium.org/226293005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@265592 0039d316-1c4b-4281-b951-d872f2087c98
* ui: Rename ui_export.h to ui_base_export.htfarina@chromium.org2014-01-061-2/+2
| | | | | | | | | | | | Also renames UI_EXPORT to UI_BASE_EXPORT. BUG=299841 TEST=None, no functional changes TBR=ben@chromium.org Review URL: https://codereview.chromium.org/93863005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@243050 0039d316-1c4b-4281-b951-d872f2087c98
* Please discard this CL. Will upload a new one in a bitananta@chromium.org2013-07-101-4/+0
| | | | | | | | | | | | | | | | | | | | | | | Relanding this with fixes for the Win64 builder and addressing jam's comment to move the call to SetCursorResourceModuleName to chrome_browser_main.cc. To fix the Win64 builder issues, the SetCursorResourceModuleName function in cursor_loader_win.cc/.h has been wrapped in a ifdef(USE_AURA) block. As per jam's comment I have moved the call to the SetCursorResourceModuleName function to ChromeBrowserMainPartsWin::ToolkitInitialized Make the SetCursorResourceModuleName function in the CursorLoaderWin class a static function and remove it from the CursorLoader and CursorClient interface. This function is called during browser initialization which prevents race conditions from reading the cursor module name before it was set. This ensures that the non standard webkit cursors can be loaded correctly when needed. Fixes bug https://code.google.com/p/chromium/issues/detail?id=257983 Bug=257983 TBR=jam@chromium.org Review URL: https://codereview.chromium.org/18939004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@210717 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 210625 "Make the SetCursorResourceModuleName function in ..."ajwong@chromium.org2013-07-091-0/+4
| | | | | | | | | | | | | | | | | | | | | | | > Make the SetCursorResourceModuleName function in the CursorLoaderWin class a static function and remove it from the > CursorLoader and CursorClient interface. > > This function is currently called from the ctor of the ChromeContentBrowserClient class which ensures that it happens > when the browser starts up and avoids any race conditions due to code attempting to read the module name before it > was set. > > This ensures that the non standard webkit cursors can be loaded correctly when needed. > Fixes bug https://code.google.com/p/chromium/issues/detail?id=257983 > > Bug=257983 > R=sky@chromium.org > > Review URL: https://codereview.chromium.org/18132011 TBR=ananta@chromium.org Review URL: https://codereview.chromium.org/18786003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@210634 0039d316-1c4b-4281-b951-d872f2087c98
* Make the SetCursorResourceModuleName function in the CursorLoaderWin class a ↵ananta@chromium.org2013-07-091-4/+0
| | | | | | | | | | | | | | | | | | | | static function and remove it from the CursorLoader and CursorClient interface. This function is currently called from the ctor of the ChromeContentBrowserClient class which ensures that it happens when the browser starts up and avoids any race conditions due to code attempting to read the module name before it was set. This ensures that the non standard webkit cursors can be loaded correctly when needed. Fixes bug https://code.google.com/p/chromium/issues/detail?id=257983 Bug=257983 R=sky@chromium.org Review URL: https://codereview.chromium.org/18132011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@210625 0039d316-1c4b-4281-b951-d872f2087c98
* Use a direct include of strings headers in ui/, part 1.avi@chromium.org2013-06-111-1/+1
| | | | | | | | | | BUG=247723 TEST=none TBR=ben@chromium.org Review URL: https://chromiumcodereview.appspot.com/16402012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@205507 0039d316-1c4b-4281-b951-d872f2087c98
* Adds interface to change mouse cursor icon size to aura/ash.yoshiki@chromium.org2013-05-211-1/+16
| | | | | | | | | | | This CL adds interface to change the cursor size to aura/ash layer. This is a part of the large cursor work (crbug.com/126942). BUG=126942 R=oshima@chromium.org, sky@chromium.org Review URL: https://codereview.chromium.org/15093003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@201206 0039d316-1c4b-4281-b951-d872f2087c98
* Support loading non system cursors in Chrome AURA/ASH windows.ananta@chromium.org2013-03-191-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is mostly intended to support special cursors passed by Webkit like the middle scroll panning cursor, etc. On Windows AURA the code to load the platform cursor is implemented in CursorLoaderWin, which attempts to load the cursor via the LoadCursor API always passing NULL as the module handle. This would not work for non system cursors. To enable support for the same added support to pass the cursor module name in the Cursor interfaces for AURA. These include the following:- 1. CursorClient 2. CursorLoader 3. NativeCursorManager Added a method SetCursorResourceModule to these interfaces. The NativeCursorManager is registered as the cursor client in AURA/ASH. It forwards calls to the CursorClient which then forwards the calls over to the CursorLoader. For ASH, I added a SetCursorResourceModule method to the ImageCursor class used by ASH. We pass the resource dll name from RenderWidgetHostViewAura::UpdateCursorIfOverSelf method. Added code in the CursorLoaderWin::SetPlatformCursor function to use the platform cursor from the passed in cursor if available, as the resource dll name may not be available to all cursor clients. BUG=176079 Review URL: https://codereview.chromium.org/12903002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@188911 0039d316-1c4b-4281-b951-d872f2087c98
* Rotate Cursor when the display is rotatedoshima@chromium.org2013-03-141-9/+10
| | | | | | | | | | | | | | - moved Rotation enum from ash to gfx::Display so that views/ui can use it. - rotate image and hot point. BUG=119268 TEST=covered by unit tests, and also test on device. Review URL: https://chromiumcodereview.appspot.com/12666006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@188174 0039d316-1c4b-4281-b951-d872f2087c98
* Desktop aura: Fix cursor displayerg@chromium.org2012-10-201-1/+1
| | | | | | | | | | | | | In r11033038, the cursorclient wasn't sent SetDeviceScaleFactor() messages. Those were needed to set the scale factor in the first place. Since we aren't receiving those calls anymore, set the default scale factor in CursorLoader to 1.0f. BUG=154183 Review URL: https://chromiumcodereview.appspot.com/11233007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@163108 0039d316-1c4b-4281-b951-d872f2087c98
* Move ash specific cursor code to CursorManager.mazda@chromium.org2012-09-111-0/+61
Main changes are as follows. - Move the responsibility of managing cursors to ash::CursorManager from aura::RootWindowHostLinux. - Set the same cursor to all root windows with CursorManager so that cursor is updated properly while dragging across displays - Introduce CursorLoader class, which implements platform specific cursor loading. - Add SetDeviceScaleFactor to CursorClient, which sets the device scale factor used for the cursor. BUG=132862,144756 Review URL: https://chromiumcodereview.appspot.com/10919135 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@156109 0039d316-1c4b-4281-b951-d872f2087c98