summaryrefslogtreecommitdiffstats
path: root/ash/shell.cc
Commit message (Collapse)AuthorAgeFilesLines
* Handful of workspace changes:sky@chromium.org2012-01-301-8/+3
| | | | | | | | | | | | | | | | | | . Correctly deal with fullscreen. . wires up grid size and sets it appropriately. . maxes windows open initially maximized if necessary. I've also wired up showing a menu when you right click on the desktop that lets you configure things. This is only temporary, but I figure worthwhile to play with various settings. BUG=111285 TEST=none R=ben@chromium.org Review URL: https://chromiumcodereview.appspot.com/9295024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@119674 0039d316-1c4b-4281-b951-d872f2087c98
* aura: Add Layer::LAYER_SOLID_COLOR to compositor.derat@chromium.org2012-01-281-1/+1
| | | | | | | | | | | | | | | | | | 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
* Allow hide animations to work again:ben@chromium.org2012-01-271-2/+9
| | | | | | | | | | | | | | - Introduces VisibilityClient, which aura::Window defers to to update layer visibility, if present. This replaces code which previously undid layer visibility changes after they were set. Layer visibility changes are potentially destructiver (they can drop textures associated with the layer and require a repaint). - Implements this in ash in VisibilityController, which animates the visibility changes of children in annotated parents. - Annotates various windows as requiring child window visibility change animations. This replaces animating visibility changes in LayoutManagers. - Adds a second layer of visibility determination to aura::Window. Some code may check Window->IsVisible which was simply testing layer visibility. We want Window->IsVisible to return false as soon as Window::Hide() is called, so we add a member for this. - We prevent stacking changes to the window from being propagated to the layer if the layer's delegate has been detached (i.e. the layer is hiding) BUG=none TEST=none Review URL: https://chromiumcodereview.appspot.com/9235016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@119453 0039d316-1c4b-4281-b951-d872f2087c98
* Aura: Allow compact window mode to be turned on/off at runtimejamescook@chromium.org2012-01-251-77/+143
| | | | | | | | | | | | | * In debug builds, Ctrl-Alt-A shows/hides it * Added test coverage for switching modes * Refactored Shell initialization to support this BUG=110174 TEST=aura_shell_unittests ShellTest.ChangeWindowMode, manual toggling Review URL: https://chromiumcodereview.appspot.com/9289008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@119111 0039d316-1c4b-4281-b951-d872f2087c98
* Add animations for system modal and tooltips.ben@chromium.org2012-01-231-1/+3
| | | | | | | | http://crbug.com/110024 TEST=none Review URL: https://chromiumcodereview.appspot.com/9141024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118691 0039d316-1c4b-4281-b951-d872f2087c98
* Renames and moves some workspace related classes to the workspacesky@chromium.org2012-01-211-5/+5
| | | | | | | | | | directory. BUG=none TEST=none Review URL: https://chromiumcodereview.appspot.com/9226040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118620 0039d316-1c4b-4281-b951-d872f2087c98
* Stack un-parented control windows in their own container. This prevents them ↵ben@chromium.org2012-01-201-1/+7
| | | | | | | | | | from interfering in existing window layout heuristics/animations. BUG=none TEST=existing Review URL: https://chromiumcodereview.appspot.com/9138026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118541 0039d316-1c4b-4281-b951-d872f2087c98
* aura: Replace UI-feature GYP flags with switches.derat@chromium.org2012-01-201-0/+3
| | | | | | | | | | | | | | | | | | 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
* Initialize the InputMethod before the windows. Allow the status container to ↵zork@chromium.org2012-01-201-6/+6
| | | | | | | | | | | | be activated. R=yusukes@chromium.org BUG=104192 TEST=With Aura enabled, tab through the status bar on the login screen Review URL: https://chromiumcodereview.appspot.com/9264005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118413 0039d316-1c4b-4281-b951-d872f2087c98
* Reland "aura/chromeos: Avoid suspending while video is playing."derat@chromium.org2012-01-191-0/+2
| | | | | | | | | | | | | | | | | | | | This reverts r118199, which was a revert of r118171. aura::VideoPropertyWriter (not ash::VideoDetector -- made a typo in the revert's description) was outliving the ash::Shell singleton. Now we explicitly destroy the VideoPropertyWriter before the shell. The only differences from r118171 are the addition of the final chunk in chrome_browser_main_chromeos.cc and a change to reparent a window in VideoDetectorTest.WindowNotVisible needed in response to r118259. BUG=110114 TEST=avoided missing DCHECK on shutdown in trybot logs this time Review URL: http://codereview.chromium.org/9254018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118375 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "aura/chromeos: Avoid suspending while video is playing."derat@chromium.org2012-01-191-2/+0
| | | | | | | | | | | | | This reverts r118171. There's an issue in the destruction order of ash::VideoDetector vs. ash::Shell. BUG=110114 TEST=built it TBR=apatrick Review URL: https://chromiumcodereview.appspot.com/9232037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118199 0039d316-1c4b-4281-b951-d872f2087c98
* Aura: Split out CompactLayoutManager from ToplevelLayoutManagerjamescook@chromium.org2012-01-181-4/+5
| | | | | | | | | | | Move the shared code to BaseLayoutManager. Adjust the unit tests. Alice needs this for some compact mode work she's doing right now. BUG=110648 TEST=Run Aura in both --aura-window-mode=normal and --aura-window-mode=compact, both still start correctly. Also unit test coverage from CompactLayoutManagerTest and ToplevelLayoutManagerTest Review URL: https://chromiumcodereview.appspot.com/9255024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118186 0039d316-1c4b-4281-b951-d872f2087c98
* aura/chromeos: Avoid suspending while video is playing.derat@chromium.org2012-01-181-0/+2
| | | | | | | | | | | | | | | | | | | This adds an ash::VideoDetector class that watches for layer updates and attempts to detect the playback of video. A Chrome OS-specific observer updates a _CHROME_VIDEO_TIME property on the X root window, which is used by the power manager to defer screen dimming or other power management features. This matches the implementation currently in use on Chrome OS, with Chrome taking the X window manager's role for detecting video and setting the property. BUG=110114 TEST=added; also manually checked that the property is updated Review URL: http://codereview.chromium.org/9249004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118171 0039d316-1c4b-4281-b951-d872f2087c98
* Rename system modal types and classes appropriately.flackr@chromium.org2012-01-181-8/+9
| | | | | | | | | | | | | | | | 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
* Aura: Fix Alt-tab not working to cycle windowsjamescook@chromium.org2012-01-181-1/+1
| | | | | | | | | | | | The window cycler was trying to check for open modal windows (which should block cycling). Instead it blocked cycling when any "always on top" window was open, which is the wrong type to check for modal windows. BUG=110444 TEST=Open alert with javascript:alert('hello') then hit Alt-tab. Windows should not cycle. Also updated unit test WindowCycleControllerTest. Review URL: http://codereview.chromium.org/9242028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118021 0039d316-1c4b-4281-b951-d872f2087c98
* Aura: Resize windows when screen/host window size changesjamescook@chromium.org2012-01-171-3/+4
| | | | | | | | | | | | | | * Monitor root window for size changes and resize maximized windows when it changes. This also ensures windows in compact window mode continue to fill the screen. * Merged CompactLayoutManager and ToplevelLayoutManager. I expected them to diverge, but they ended up being nearly identical. * Expanded unit test coverage of ToplevelLayoutManager. * Put a few window_util functions into a namespace. I didn't do them all because the patch would be too big. BUG=109952 TEST=Run Aura, maximize an Aura window, change the size of the host window (or plug an external monitor into your ChromeOS device). Window should still fill the screen. Run Aura in compact window mode (default on small screen laptops). Plug in an external monitor. Windows should still fill the screen. Review URL: https://chromiumcodereview.appspot.com/9214009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@117931 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes crash in ShelfLayoutManager that would occur when closing windowsky@chromium.org2012-01-171-0/+15
| | | | | | | | | | | | | | | with a full screen window. The problem was we deleted the launcher and left other objects around so that if one of those other objects needed the launcher we would crash. BUG=110205 TEST=covered by unit tests. R=ben@chromium.org Review URL: http://codereview.chromium.org/9133017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@117906 0039d316-1c4b-4281-b951-d872f2087c98
* * Don't activate a window if screen is locked.oshima@chromium.org2012-01-131-9/+1
| | | | | | | | | | | | | * StopEventsPropagation should check window visibility. * Changed IsScreenLocked to use the same logic as CanFocus. BUG=none TEST=new test case is added to window_unittests.cc Review URL: http://codereview.chromium.org/9181012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@117600 0039d316-1c4b-4281-b951-d872f2087c98
* Allow a Views client to provide a default frameview for window widgets.ben@chromium.org2012-01-111-0/+10
| | | | | | | | | | | | Provides a default one in Ash that will be used to match kennedy-spec. Much tweaking is needed, but that can come in future CLs. http://crbug.com/109138 TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=117165 Review URL: http://codereview.chromium.org/9166014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@117170 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 117165 - Allow a Views client to provide a default frameview for ↵ben@chromium.org2012-01-111-10/+0
| | | | | | | | | | | | | | | | window widgets. Provides a default one in Ash that will be used to match kennedy-spec. Much tweaking is needed, but that can come in future CLs. http://crbug.com/109138 TEST=none Review URL: http://codereview.chromium.org/9166014 TBR=ben@chromium.org Review URL: http://codereview.chromium.org/9166035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@117168 0039d316-1c4b-4281-b951-d872f2087c98
* Allow a Views client to provide a default frameview for window widgets.ben@chromium.org2012-01-111-0/+10
| | | | | | | | | | | Provides a default one in Ash that will be used to match kennedy-spec. Much tweaking is needed, but that can come in future CLs. http://crbug.com/109138 TEST=none Review URL: http://codereview.chromium.org/9166014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@117165 0039d316-1c4b-4281-b951-d872f2087c98
* Aura: Convert Alt-tab to most-recently-used orderjamescook@chromium.org2012-01-101-2/+13
| | | | | | | | | | | | | | * Windows should cycle A -> B -> A for repeated Alt-tab presses. * Holding down Alt allows cycling A -> B -> C -> D... * Extracted cycling logic into WindowCycleController. * Added unit tests for new behavior. BUG=109193 TEST=aura_shell_unittests WindowCycleControllerTest Review URL: http://codereview.chromium.org/9101010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@117112 0039d316-1c4b-4281-b951-d872f2087c98
* aura: Add container for setting bubbles.derat@chromium.org2012-01-071-1/+6
| | | | | | | | | | | | | | | | | 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
* Adds support for Window Modality to Ash.ben@chromium.org2012-01-061-0/+5
| | | | | | | | http://crbug.com/109290 TEST=unittests Review URL: http://codereview.chromium.org/9123016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116767 0039d316-1c4b-4281-b951-d872f2087c98
* Aura: Fix Alt-Tab in compact window modejamescook@chromium.org2012-01-061-3/+5
| | | | | | | | | | | We weren't creating the launcher in compact window mode, but for Alt-Tab to work we need access to its window list and data model. Instead, create the launcher and just hide its widget. This allows us to avoid NULL checks and make compact mode less likely to break in the future. BUG=109213 TEST=Run Aura in compact window mode. Open several windows. Hit alt-tab to cycle through them. Review URL: http://codereview.chromium.org/8983032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116762 0039d316-1c4b-4281-b951-d872f2087c98
* Aura: Toggling window mode in about:flags works on CrOS devicesjamescook@chromium.org2012-01-051-22/+27
| | | | | | | | | | | | | | The problem was that programmatically modifying the command line doesn't change switches visible in about:flags -- they are in a special section. Reworked the code to: * Not modify the command line when automatically setting the mode. We now store the mode in ash::Shell. * Add an "automatic" option for window mode, equivalent to not specifying anything on the command line. BUG=109002 TEST=aura_shell_unittests for Shell, manual on device modifying about:flags Review URL: http://codereview.chromium.org/9093002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116438 0039d316-1c4b-4281-b951-d872f2087c98
* chromeos: Implement power button animations for Aura.derat@chromium.org2012-01-041-6/+5
| | | | | | | | | | | | | | | 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
* Bypass ToplevelWindowEventFilter for panels.prasadt@chromium.org2011-12-271-0/+4
| | | | | | | | | | | With this change minimize and drag work on panels in Aura. BUG=108497 TEST=Run chrome in aura. Create a panel. Click on titlebar. Drag. Review URL: http://codereview.chromium.org/9027020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@115850 0039d316-1c4b-4281-b951-d872f2087c98
* IME (input method editor) support for Aura, part 3 of 3: Use ui::InputMethod ↵yusukes@chromium.org2011-12-261-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in ash. Part 1: http://codereview.chromium.org/8659033/ Part 2: http://codereview.chromium.org/8687027/ The basic design of the feature is that to use an input method as an event filter for a KeyEvent, and to feed all KeyPress and KeyRelease events that are passed to the filter to the input method. The input method sends IME results (e.g. composition text) to RenderWidgetHostViewAura or NativeWidgetAura as needed. RenderWidgetHostViewAura: - Just like RWHVV, implements ui::TextInputClient interface so that RWHVA could receive an event such as 'SetComposition' and 'InsertChar' from an input method object owned by InputMethodEventFilter. - Sends a notification to the input method object on focus, blur, text input type change, etc. - OnKeyEvent() handler is now able to handle a non-native key event, e.g. a VKEY_PROCESSKEY event, which is fabricated by the input method editor. NativeWidgetAura: - Uses views::InputMethodBridge instead of views::InputMethodIBus. - InputMethodBridge, which implements ui::TextInputClient interface, just receives IME results (e.g. composition text) from ui::InputMethod and forwards them to Views UI (e.g. a text field). - InputMethodBridge also receives a request like 'CancelComposition' from the UI and forwards the request to ui::InputMethod. InputMethodEventFilter: - Creates and owns a ui::InputMethodIBus object. If IBus-1.4 is not available (e.g. Windows and Goobuntu), creates an instance of ui::MockInputMethod instead. - In PreHandleKeyEvent(), sends a KeyPress and KeyRelease event to the input method. - Implements ui::InputMethodDelegate interface so that InputMethodEventFilter could receive a translated key press and key release event (i.e. a key event translated by the IME) which has to be sent back to the root window. Note that the translated key event might be pre-handled by a global short-cut key event filter, otherwise is sent to NWA or RWHVA from the root window. Also note that a Char event is always sent directly from the input method to a TextInputClient. The ui::InputMethodDelegate is not used for that purpose. Supported platforms: - Aura + Chrome OS (IME works!) - Aura + Chrome OS + TOUCH_UI (compiles, but virtual keyboard is not shown since views::TextInputTypeTracker is not ported to Aura yet.) - Aura + Linux, with and without IBus-1.4 - Aura + Windows (compiles, but IME does not work. views::InputMethodWin is not ported to Aura yet.) BUG=97261 TEST=ran input_method_event_filter_unittests.cc Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=113224 Review URL: http://codereview.chromium.org/8576005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@115778 0039d316-1c4b-4281-b951-d872f2087c98
* Rename the aura_shell namespace to ashben@chromium.org2011-12-241-2/+2
| | | | | | | | | http://crbug.com/108457 TEST=none TBR=sky Review URL: http://codereview.chromium.org/9033007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@115748 0039d316-1c4b-4281-b951-d872f2087c98
* Move last few files -> ashben@chromium.org2011-12-231-0/+369
http://crbug.com/108457 TEST=none TBR=sky Review URL: http://codereview.chromium.org/9036011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@115743 0039d316-1c4b-4281-b951-d872f2087c98