summaryrefslogtreecommitdiffstats
path: root/ash/wm/power_button_controller.cc
Commit message (Collapse)AuthorAgeFilesLines
* Change GetContainer to take a root windowoshima@chromium.org2012-06-111-9/+11
| | | | | | | | | | | Update the use of GetContainer to use the correct root window. BUG=123160 TEST=no functional change. all tests must pass. Review URL: https://chromiumcodereview.appspot.com/10540076 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@141384 0039d316-1c4b-4281-b951-d872f2087c98
* Add EnvEventFilter to filter events before root window process eventoshima@chromium.org2012-06-061-5/+7
| | | | | | | | Factor out CursorManager from RootWindowEventFilter Review URL: https://chromiumcodereview.appspot.com/10444107 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@140714 0039d316-1c4b-4281-b951-d872f2087c98
* Rename GetRootWindow() -> GetPrimaryRootWindow()oshima@chromium.org2012-05-251-7/+7
| | | | | | | | | BUG=123160 TEST=none Review URL: https://chromiumcodereview.appspot.com/10442017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@138950 0039d316-1c4b-4281-b951-d872f2087c98
* chromeos: Ignore power button presses when screen is off.derat@chromium.org2012-05-171-0/+10
| | | | | | | | | | | | | | | Make PowerButtonController ignore power button events when the screen is turned off -- if the user hits the power button to turn the screen back on, we don't want to lock or shutdown if they hold it a bit too long. BUG=128451 TEST=added, also did manual testing Review URL: https://chromiumcodereview.appspot.com/10382211 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@137679 0039d316-1c4b-4281-b951-d872f2087c98
* aura/ash split: Moves RootWindowEventFilter and InputMethodEventFilter to ↵erg@google.com2012-05-151-1/+1
| | | | | | | | | | | | | | | | | | | ui/aura/. All of InputMethodEventFilter and more than half of RootWindowEventFilter were copied verbatim to a DesktopRootWindowEventFilter. Instead of copying the other half for another patch, I'm just moving RWEF and deleting the desktop version. (InputMethodEventFilterUnittest was simple enough to move with the file, but RootWindowEventFilter seems to act more like an integraiton test of a lot of the stuff on Shell.) BUG=125106 Review URL: https://chromiumcodereview.appspot.com/10332145 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@137175 0039d316-1c4b-4281-b951-d872f2087c98
* ui: Move compositor/ directory out of gfx/, up to ui/.tfarina@chromium.org2012-05-051-4/+4
| | | | | | | | | | BUG=104040 R=piman@chromium.org,ben@chromium.org TBR=sky@chromium.org Review URL: https://chromiumcodereview.appspot.com/10365007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@135560 0039d316-1c4b-4281-b951-d872f2087c98
* ash: Resize PowerButtonController background layer.derat@chromium.org2012-05-011-0/+7
| | | | | | | | | | | | | | | | PowerButtonController wasn't getting registered as an observer on the aura::RootWindow, so its background layer wasn't resized to match the root window's size. I don't think that this caused any problems in practice, as the layer gets recreated every time it's shown. BUG=none TEST=added Review URL: http://codereview.chromium.org/10263015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@134722 0039d316-1c4b-4281-b951-d872f2087c98
* Cancel partial screenshot UI when lock happens.mukai@chromium.org2012-04-201-20/+37
| | | | | | | | | BUG=122901 TEST=manually, aura_shell_unittests passed Review URL: https://chromiumcodereview.appspot.com/10008074 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@133164 0039d316-1c4b-4281-b951-d872f2087c98
* Makes the launcher use a layer with a solid color, which is cheapersky@chromium.org2012-03-231-1/+1
| | | | | | | | | | | | than a textured layer. BUG=119581 TEST=none R=ben@chromium.org Review URL: https://chromiumcodereview.appspot.com/9835028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@128500 0039d316-1c4b-4281-b951-d872f2087c98
* * Add RootWindow to RootWindowObserver::OnRootWindowResized as there can be ↵oshima@chromium.org2012-03-211-2/+3
| | | | | | | | | | | | | | more than one root window now. * Don't translate size in GetHostSize * Fix a few places that should use RootWindow's bounds instead of host bounds. BUG=115510 TEST=none Review URL: https://chromiumcodereview.appspot.com/9802001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@127917 0039d316-1c4b-4281-b951-d872f2087c98
* ash: Create new containers for PowerButtonController.derat@chromium.org2012-02-231-146/+91
| | | | | | | | | | | | | | | | This nests ash's existing containers inside of three new higher-level containers-of-containers. The new higher-level containers can be animated by PowerButtonController without messing up transformations that have already been applied to the lower-level containers. BUG=114953 TEST=manual: locked and unlocked screen in compact mode with multiple browser windows Review URL: http://codereview.chromium.org/9428056 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@123288 0039d316-1c4b-4281-b951-d872f2087c98
* aura: Handle shutdown requests from login and lock screens.derat@chromium.org2012-02-171-18/+49
| | | | | | | | | | | | | | | | | | | | | This routes shutdown requests made through the "Shut down" button on the WebUI login screen through PowerButtonController (which probably needs a better name). As a result, we show the regular zoom-out animation instead of briefly showing the desktop background when running in overlapping mode. I'm also adding a missing stopPropagation() in the WebUI code so we won't send two shutdown requests whenever the button is clicked. BUG=108701,114688 TEST=added, also manual Review URL: http://codereview.chromium.org/9423003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@122613 0039d316-1c4b-4281-b951-d872f2087c98
* Provide a RootWindow instance getter on the shell, in preparation for ↵ben@chromium.org2012-02-171-6/+6
| | | | | | | | | | removing RootWindow::GetInstance(). http://crbug.com/112131 TEST=compiles Review URL: https://chromiumcodereview.appspot.com/9395038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@122561 0039d316-1c4b-4281-b951-d872f2087c98
* If there are existing transformation on the layer before screen locking, we ↵alicet@chromium.org2012-02-161-92/+113
| | | | | | | | | | | | should restore it after screen lock is dismissed. BUG=113756 TEST=verified on alex. Review URL: http://codereview.chromium.org/9348089 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@122307 0039d316-1c4b-4281-b951-d872f2087c98
* Implement taking partial screenshot.mukai@chromium.org2012-02-161-0/+1
| | | | | | | | | | BUG=108763 TEST=manually && aura_shell_unittests passed Review URL: http://codereview.chromium.org/9368051 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@122281 0039d316-1c4b-4281-b951-d872f2087c98
* aura: Clear screen for non-power-button exit.derat@chromium.org2012-02-161-0/+13
| | | | | | | | | | | | | | | | | | | | | This makes PowerButtonController clear the screen to black when it hears that Chrome is about to exit. We already display an animation when the power button is held; this handles other shutdown or signout paths like the wrench menu or screen locker. We listen for NOTIFICATION_APP_TERMINATING; NOTIFICATION_APP_EXITING is sent too early (before onbeforeunload handlers are called) and NOTIFICATION_SESSION_END is sent too late. BUG=108701,111884,113526 TEST=manual Review URL: http://codereview.chromium.org/9402024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@122224 0039d316-1c4b-4281-b951-d872f2087c98
* aura: Hide cursor during and after shutdown.derat@chromium.org2012-02-141-0/+2
| | | | | | | | | | | | | | | | | | | | | This updates the semantics of aura::RootWindow::ShowCursor() so that after the cursor is hidden, it remains hidden during subsequent calls to SetCursor(). It also makes us not show the cursor on mouse movement if we're in the process of shutting down. Finally, it makes us set an invisible cursor on the root window when running on a Chrome OS device so that the cursor will remain hidden after Chrome has exited during shutdown. BUG=111884 TEST=manual: can't see cursor while shutting down now Review URL: http://codereview.chromium.org/9388030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@121960 0039d316-1c4b-4281-b951-d872f2087c98
* aura: Display black background when locking from wrench.derat@chromium.org2012-02-141-0/+5
| | | | | | | | | | | | | | | | | | | | | When the screen is locked via the wrench menu instead of by holding the power button, we skip the slow-close animation and don't show the black background layer. This formerly caused the compositor's blue clear color to be visible and now results in a neat hall-of-mirrors effect due to previous frames not being cleared. This change makes us show the background if it isn't already visible when we start the fast-close animation after getting notice that we're locking. BUG=113526 TEST=added, also manual Review URL: http://codereview.chromium.org/9385030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@121825 0039d316-1c4b-4281-b951-d872f2087c98
* Aura: Create a new containerr for drag/drop images and tooltips.varunjain@chromium.org2012-02-021-1/+2
| | | | | | | | | BUG=111148 TEST=manual Review URL: https://chromiumcodereview.appspot.com/9314040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@120230 0039d316-1c4b-4281-b951-d872f2087c98
* aura: Add Layer::LAYER_SOLID_COLOR to compositor.derat@chromium.org2012-01-281-19/+2
| | | | | | | | | | | | | | | | | | This adds a new layer type backed by WebKit::WebSolidColorLayer. I'm using it for the power button animation's background (which previously had a fullscreen texture that it just painted black). I'm also renaming LAYER_HAS_TEXTURE to LAYER_TEXTURED and LAYER_HAS_NO_TEXTURE to LAYER_NOT_DRAWN. BUG=109083 TEST=manual: checked that the power button animation looks the same as before TBR=sky Review URL: http://codereview.chromium.org/9289036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@119580 0039d316-1c4b-4281-b951-d872f2087c98
* aura: Replace UI-feature GYP flags with switches.derat@chromium.org2012-01-201-46/+49
| | | | | | | | | | | | | | | | | | This replaces the aura_show_about_flag_window_mode and chromeos_legacy_power_button GYP flags with --aura-force-compact-window-mode and --aura-legacy-power-button command-line switches. There is concern that using compile-time flags to control these features will greatly increase the workload on the Chrome OS builders; we apparently currently share Chrome binaries across all Chrome OS boards with the same architecture. BUG=109209,109052,chrome-os-partner:7570 TEST=manual Review URL: https://chromiumcodereview.appspot.com/9264025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118522 0039d316-1c4b-4281-b951-d872f2087c98
* Rename system modal types and classes appropriately.flackr@chromium.org2012-01-181-1/+1
| | | | | | | | | | | | | | | | Renames the following as per the bug description by ben@: kShellWindowId_ModalContainer -> kShellWindowId_SystemModalContainer kShellWindowId_LockModalContainer -> kShellWindowId_LockSystemModalContainer ModalContainerLayoutManager->SystemModalContainerLayoutManager ModalityEventFilter->SystemModalContainerEventFilter BUG=109460 TEST=All tests and compilation still succeed. Review URL: https://chromiumcodereview.appspot.com/9249022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118127 0039d316-1c4b-4281-b951-d872f2087c98
* chromeos/aura: Handle power button on unofficial hardware.derat@chromium.org2012-01-101-0/+18
| | | | | | | | | | | | | | | | | Most official Chrome OS hardware reports power button releases correctly, but on standard x86 systems, we'll always receive a button up event just after the button down. This change adds a chromeos_legacy_power_button gyp flag; when set, we lock the screen or shut down immediately when the button is pressed instead of providing interactive animations. BUG=109209 TEST=added tests; also did manual testing Review URL: http://codereview.chromium.org/9110044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116993 0039d316-1c4b-4281-b951-d872f2087c98
* aura: Add container for setting bubbles.derat@chromium.org2012-01-071-1/+2
| | | | | | | | | | | | | | | | | This adds a new container (with nothing stored in it yet) for the bubbles that are briefly displayed on Chrome OS when the volume or brightness is changed. I'm also renaming the MenusAndTooltipsContainer window ID constant to MenuAndTooltipContainer to match the other constants. BUG=108389 TEST=compiles Review URL: http://codereview.chromium.org/9110034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116788 0039d316-1c4b-4281-b951-d872f2087c98
* chromeos: Handle lock button for Aura.derat@chromium.org2012-01-051-12/+35
| | | | | | | | | | | | This makes us handle lock button messages from the Chrome OS power manager in a similar manner to power button messages. BUG=98328 TEST=added; also did manual testing after updating powerm to treat F1 as the lock button instead of F13 Review URL: http://codereview.chromium.org/9108015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116573 0039d316-1c4b-4281-b951-d872f2087c98
* chromeos: Implement power button animations for Aura.derat@chromium.org2012-01-041-0/+495
This adds animated transitions first to the lock screen and then to shutdown similar to those currently implemented in the Chrome OS power manager and X window manager. I'll add support for the lock key in a later change. BUG=98328 TEST=added tests; also did a lot of manual testing TBR=evan@chromium.org Review URL: http://codereview.chromium.org/8976012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116245 0039d316-1c4b-4281-b951-d872f2087c98