summaryrefslogtreecommitdiffstats
path: root/ui/aura/window_tree_host_win.cc
Commit message (Collapse)AuthorAgeFilesLines
* aura: Unify Ozone+Windows+Android WindowTreeHostsievers2015-10-161-155/+0
| | | | | | | | | | | | | This effectively adds an Android WindowTreeHost. For these three most platform-specific stuff happens in PlatformWindow* and the WTH is mostly a shim. BUG=507792 Review URL: https://codereview.chromium.org/1390883003 Cr-Commit-Position: refs/heads/master@{#354585}
* aura: Remove WindowTreeHost::GetNativeScreenSize.sadrul2015-10-141-6/+0
| | | | | | | | | | | | WindowTreeHost::GetNativeScreenSize() is only used in a few locations, and only relevant on Windows. So remove the various implementations, and instead directly lookup from the system on Windows when necessary. BUG=none Review URL: https://codereview.chromium.org/1407553003 Cr-Commit-Position: refs/heads/master@{#354041}
* Don't use base::MessageLoop::{Quit,QuitClosure} in ui/ki.stfu2015-10-121-1/+1
| | | | | | | | | | | | | This patch renames base::MessageLoop::{Quit,QuitClosure} to base::MessageLoop::{QuitWhenIdle,QuitWhenIdleClosure}. BUG=131220 TEST= R=sadrul@chromium.org Review URL: https://codereview.chromium.org/1402543002 Cr-Commit-Position: refs/heads/master@{#353581}
* aura: Allow deferred widget creationsievers2015-08-251-1/+2
| | | | | | | | | | | | | This further passes through OnAcceleratedWidgetAvailable(), which will then defer LayerTreeHost::SetLayerTreeHostClientReady(). That again means there will be no attempts to create an OutputSurface until OnAcceleratedWidgetAvailable() happens. BUG=513540,255128 Review URL: https://codereview.chromium.org/1295253002 Cr-Commit-Position: refs/heads/master@{#345407}
* Fixed all unused-variable Clang warnings on Windows.mgiuca2015-07-081-5/+0
| | | | | | | | | | | | | | Usually, fixed by removing the unused variables. Some variables had to be guarded by #ifs. Some variables could be used instead. Also removed unused test file sweep02_16b_mono_16KHz.raw. BUG=505319 TBR=rpaquay@chromium.org Review URL: https://codereview.chromium.org/1220133003 Cr-Commit-Position: refs/heads/master@{#337767}
* Plumbs through device scale factor when widget is availablesky2015-06-181-1/+2
| | | | | | | | | | | BUG=none TEST=none R=sadrul@chromium.org TBR=jam@chromium.org Review URL: https://codereview.chromium.org/1184123008 Cr-Commit-Position: refs/heads/master@{#335059}
* Refactoring the ownership of ui::InputMethod.shuchen2015-06-101-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is IMF refactoring according to the design: - For @google.com: https://docs.google.com/document/d/14PQN4fbbSTlJmIk6qk7RzsuNr7O22DUTfNQ6slxKWV0 - For @chromium.org: https://docs.google.com/document/d/1sDES_kuEVUjb_FwCvKsg0Ef48edq5lAx589r0qUtG4g This cl includes some fundamental changes: 1) ui::InputMethod is created & owned by aura::WindowTreeHost. Therefore, the InputMethod instance can be accessed through root_window->GetHost()->GetInputMethod, and no need to save kRootWindowInputMethodKey instance to the root window anymore. 2) Removed InputMethodEventFilter, therefore no need the flag IsTranslated()/SetTranslated() on ui::KeyEvent. 3) Makes aura::WindowTreeHost as a ui::EventSource, because all kinds of WindowTreeHost are also ui::EventSource. Therefore, WindowTreeHost can override DeliverEventToProcessor method to intercept key events for input method processing. Note: 1) The key events processing by input method happens after event rewriters and before the EventHandler's, which remains no change to original on desktop environment. For Ash, the IME key event handling is moved ahead of some other handles: - MagnifierKeyScroller (CrOS only): handles Arrow keys when magnification is enabled. - SpokenFeedbackToggler (CrOS only): handles F6 key when SpokenFeedbackToggler is enabled. - OverlayEventFilter: handles ESC/OEM_2/HELP/F14 keys to cancel the overlay UI. 2) For Ash, remains the singleton ui::InputMethod instance, owned by DisplayController. Because if let each AshWindowTreeHost own separated ui::InputMethod instances, it will break things: a) There is a test: ExtendedDesktopTest.KeyEventsOnLockScreen, which tests the text field in root window X can be inserted with text while dispatching key events to root window Y. I think this test makes no sense and will confirm with oshima@. b) For now for Ozone, DrmWindowHost::CanDispatchEvent() always returns true, so that only primary window tree host can receive the key events, which makes the "primary" InputMethod can receive the key events. c) For Virtual Keyboard on CrOS, it listens to the notification through InputMethodObserver::OnShowImeIfNeeded(), which is bound to the specific InputMethod instance. However, the Virtual Keyboard should work cross multiple root windows & InputMethod instances. BUG=474828 TEST=Verified on local builds, including linux, cros, win7 & win8.1. And all tests passed. Review URL: https://codereview.chromium.org/1155013005 Cr-Commit-Position: refs/heads/master@{#333698}
* Hide compositor when DesktopWindowTreeHostWin::Hide is called.jbauman2015-06-041-2/+2
| | | | | | | | This avoids trying to draw hidden windows and improves performance of resize because status bubble isn't continually redrawn. Review URL: https://codereview.chromium.org/1157433008 Cr-Commit-Position: refs/heads/master@{#332768}
* 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}
* aura: Remove WindowTreeHost::PostNativeEvent().Sadrul Habib Chowdhury2014-11-071-5/+0
| | | | | | | | | | | | | | | | | WindowTreeHost::PostNativeEvent() is only used in tests. So remove this from the public API. Instead: . For Win32, directly use PostMessage (this is used in only two places). . For Ozone, use EventSourceTestApi to inject the event (this is equivalent to current code, in terms of not doing the right thing when menus are open). . For X11, introduce aura::test::PostEventToWindowTreeHost() instead, and use it in tests. BUG=none R=sky@chromium.org Review URL: https://codereview.chromium.org/710553002 Cr-Commit-Position: refs/heads/master@{#303315}
* aura: Use PlatformWindow from WindowTreeHostWin.sadrul@chromium.org2014-07-231-108/+48
| | | | | | | | | | | | | | | | | With this patch, both Windows and Ozone implementations use PlatformWindow for interacting with the native windowing system. Eventually, the X11 implementations will also use this, and WindowTreeHost will have a single implementation on all platforms. BUG=none R=ben@chromium.org Previously landed in r284850, but reverted in r284905 because it broke a multi- window ash unit-test on Windows. The test is now disabled (r284931). Review URL: https://codereview.chromium.org/400413002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@284986 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 284850 "aura: Use PlatformWindow from WindowTreeHostWin."markusheintz@chromium.org2014-07-231-48/+108
| | | | | | | | | | | | | | | | | | | | > aura: Use PlatformWindow from WindowTreeHostWin. > > With this patch, both Windows and Ozone implementations use PlatformWindow for > interacting with the native windowing system. Eventually, the X11 implementations > will also use this, and WindowTreeHost will have a single implementation on all > platforms. > > BUG=none > R=ben@chromium.org > > Review URL: https://codereview.chromium.org/400413002 TBR=sadrul@chromium.org Review URL: https://codereview.chromium.org/410873003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@284905 0039d316-1c4b-4281-b951-d872f2087c98
* aura: Use PlatformWindow from WindowTreeHostWin.sadrul@chromium.org2014-07-231-108/+48
| | | | | | | | | | | | | | With this patch, both Windows and Ozone implementations use PlatformWindow for interacting with the native windowing system. Eventually, the X11 implementations will also use this, and WindowTreeHost will have a single implementation on all platforms. BUG=none R=ben@chromium.org Review URL: https://codereview.chromium.org/400413002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@284850 0039d316-1c4b-4281-b951-d872f2087c98
* aura: Remove WindowTreeHost::OnDeviceScaleFactorChanged.sadrul@chromium.org2014-07-121-5/+0
| | | | | | | | | | | | None of the implementations if WindowTreeHosts do anything when the device-scale factor changes. So remove it. BUG=none R=sky@chromium.org Review URL: https://codereview.chromium.org/389663003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@282799 0039d316-1c4b-4281-b951-d872f2087c98
* aura: Remove WindowTreeHost::QueryMouseLocation().sadrul@chromium.org2014-04-281-18/+0
| | | | | | | | | | | | | The primary use-case for QueryMouseLocation() is for X11 interactive tests. The only other use was in WindowEventDispatcher, but that code is no longer necessary. BUG=none R=sky@chromium.org Review URL: https://codereview.chromium.org/251743004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@266565 0039d316-1c4b-4281-b951-d872f2087c98
* Adding GetEventSource() method to the WindowTreeHost class.mfomitchev@chromium.org2014-04-241-0/+4
| | | | | | Review URL: https://codereview.chromium.org/250103002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@266024 0039d316-1c4b-4281-b951-d872f2087c98
* Introdcue AshWindowTreeHost and move ash/chrome specific code in WTH to ash.oshima@chromium.org2014-04-111-58/+1
| | | | | | | | | | | | | | | | | | | | | | | | Other notable changes: * Removed WindowTreeHostFactory as this is no longer necessary. * Moved RootWindowTransformer to ash/host * Removed Set/GetInsets which are no longer necessary (a code in SetInsets is now a part of SetRootWindowTransformer) * Added TransformerHelper that implements common behavior to transform root window for AshWindowTreeHost * Added DEPS files * Updated metro_viewer code to make sure it creates ash::AshRemoteWindowHostTree A few more simplifications to come: * Simplify RootWindowTransformer * Eliminate EnvObserver in AshWindowTreeHostX11 I'll also work on DEPS reorg to make it more explicit under ash/ BUG=355771 TEST=No functional change. ui/aura/window_tree_host_x11_unittests has been moved to ash/host/ash_window_tree_host_x11_unittests Review URL: https://codereview.chromium.org/201573015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@263192 0039d316-1c4b-4281-b951-d872f2087c98
* Remove PrepareForShutdownoshima@chromium.org2014-03-201-4/+0
| | | | | | | | | | | | Filter events after shutdown in event filter instead. BUG=None Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=258077 Review URL: https://codereview.chromium.org/196573023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@258217 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 258077 "Remove PrepareForShutdown"brettw@chromium.org2014-03-191-0/+4
| | | | | | | | | | | | | | | | | | | | | Broke Linux official builder: http://build.chromium.org/p/chromium/builders/Linux/builds/48352/steps/compile/logs/stdio ../../apps/shell/browser/shell_browser_main_parts.cc:197:42:error: 'class aura::WindowEventDispatcher' has no member named 'PrepareForShutdown' ninja: build stopped: subcommand failed. > Remove PrepareForShutdown > Filter events after shutdown in event filter instead. > > BUG=None > > Review URL: https://codereview.chromium.org/196573023 TBR=oshima@chromium.org Review URL: https://codereview.chromium.org/205313002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@258103 0039d316-1c4b-4281-b951-d872f2087c98
* Remove PrepareForShutdownoshima@chromium.org2014-03-191-4/+0
| | | | | | | | | | Filter events after shutdown in event filter instead. BUG=None Review URL: https://codereview.chromium.org/196573023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@258077 0039d316-1c4b-4281-b951-d872f2087c98
* Clean up WindowEventDispatcher some more.ben@chromium.org2014-03-071-7/+7
| | | | | | | | | | | | | | | . Eliminate the implementation of LayerAnimationObserver. It seems no one expects WED to be a LAO anymore. . Remove WindowTreeHostDelegate. This involves moving some of the functions to WTH, removing some completely, and moving the remainder to the WED public API. A little icky for now, but I plan to take a pass on cleaning up WED's public API once I get it pared down. . window_tree_host_x11_unittest provided an implementation of WTHD that was not WED. This is not a valid situation now since various functions in WTH now call directly through to WED. Replaced this with a simple EventHandler to test that events are being dispatched. R=sky@chromium.org http://crbug.com/308843 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=255368 Review URL: https://codereview.chromium.org/188223002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@255533 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 255368 "Clean up WindowEventDispatcher some more."ben@chromium.org2014-03-061-7/+7
| | | | | | | | | | | | | | | | | | | > Clean up WindowEventDispatcher some more. > > . Eliminate the implementation of LayerAnimationObserver. It seems no one expects WED to be a LAO anymore. > . Remove WindowTreeHostDelegate. This involves moving some of the functions to WTH, removing some completely, and moving the remainder to the WED public API. A little icky for now, but I plan to take a pass on cleaning up WED's public API once I get it pared down. > . window_tree_host_x11_unittest provided an implementation of WTHD that was not WED. This is not a valid situation now since various functions in WTH now call directly through to WED. Replaced this with a simple EventHandler to test that events are being dispatched. > > R=sky@chromium.org > http://crbug.com/308843 > > Review URL: https://codereview.chromium.org/188223002 TBR=ben@chromium.org Review URL: https://codereview.chromium.org/188843003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@255399 0039d316-1c4b-4281-b951-d872f2087c98
* Clean up WindowEventDispatcher some more.ben@chromium.org2014-03-061-7/+7
| | | | | | | | | | | | | . Eliminate the implementation of LayerAnimationObserver. It seems no one expects WED to be a LAO anymore. . Remove WindowTreeHostDelegate. This involves moving some of the functions to WTH, removing some completely, and moving the remainder to the WED public API. A little icky for now, but I plan to take a pass on cleaning up WED's public API once I get it pared down. . window_tree_host_x11_unittest provided an implementation of WTHD that was not WED. This is not a valid situation now since various functions in WTH now call directly through to WED. Replaced this with a simple EventHandler to test that events are being dispatched. R=sky@chromium.org http://crbug.com/308843 Review URL: https://codereview.chromium.org/188223002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@255368 0039d316-1c4b-4281-b951-d872f2087c98
* Rename RootWindowObserver -> WindowTreeHostObserver.ben@chromium.org2014-03-051-5/+4
| | | | | | | | | | | Move observer management and notification to WTH. R=sky@chromium.org http://crbug.com/348874 Review URL: https://codereview.chromium.org/186423002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@255108 0039d316-1c4b-4281-b951-d872f2087c98
* Window ownership -> WindowTreeHostben@chromium.org2014-03-041-2/+1
| | | | | | | | | | | | | Replaces Window::GetDispatcher with Window::GetHost(). Had to clear ScreenPositionClient property prior to window teardown as tests on desktop delete it prior to destroying the window hierarchy. Unhooking the property appears to have no ill-effect. R=sky@chromium.org http://crbug.com/308843 Review URL: https://codereview.chromium.org/184903003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@254642 0039d316-1c4b-4281-b951-d872f2087c98
* Invert the ownership relationship between WindowEventDispatcher and ↵ben@chromium.org2014-02-281-0/+1
| | | | | | | | | | | | | | | | | WindowTreeHost. Prior to this change, WindowEventDispatcher owns WindowTreeHost. Code wishing to own an aura::Window hierarchy must create a WindowEventDispatcher, which will either create a default WTH implementation or use the one supplied by the caller. This relationship made more sense long ago in the days when WED was called RootWindow, and served a purpose broader than just event dispatch bookkeeping. Those days are gone. For code using Aura, it makes more sense for them to create the WTH directly. I predict this may permit some simplification of shutdown code in some situations, since I think it is more intuitive to think of the destruction cascade initiating at the object that most closely binds to the platform accelerated widget. Today, ownership of the window tree sits with WED, which must destroy the window tree and the host. This CL attempts to make as few changes as possible to invert the ownership. The effect of this is that there is a bunch of code left that probably only needs a WTH but instead has a WED. I will get around to cleaning these up in a future CL. http://crbug.com/308843 R=sky@chromium.org Review URL: https://codereview.chromium.org/180003006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@254071 0039d316-1c4b-4281-b951-d872f2087c98
* Move root_window.* to window_event_dispatcher.*ben@chromium.org2014-02-211-1/+1
| | | | | | | | | http://crbug.com/308843 TBR=sky@chromium.org Review URL: https://codereview.chromium.org/174803002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@252651 0039d316-1c4b-4281-b951-d872f2087c98
* Rename RootWindow -> WindowEventDispatcher.ben@chromium.org2014-02-211-7/+3
| | | | | | | | | | http://crbug.com/308843 R=sky@chromium.org Review URL: https://codereview.chromium.org/172743002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@252501 0039d316-1c4b-4281-b951-d872f2087c98
* Remove some methods from RootWindow that really belong on the WTH.ben@chromium.org2014-02-161-13/+13
| | | | | | | | | TBR=sky@chromium.org BUG= Review URL: https://codereview.chromium.org/167563004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@251606 0039d316-1c4b-4281-b951-d872f2087c98
* Move root_window_host* in aura to window_tree_host*.ben@chromium.org2014-02-141-0/+318
R=sky@chromium.org TBR=sky@chromium.org BUG= Review URL: https://codereview.chromium.org/160573002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@251379 0039d316-1c4b-4281-b951-d872f2087c98