diff options
author | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-22 15:04:22 +0000 |
---|---|---|
committer | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-22 15:04:22 +0000 |
commit | 23a2dc8da8b62b771ef4b0a803cd1e0dc2257d72 (patch) | |
tree | 13bcdd5b2ad7ba23ef75f49096afcba25115fb7d /ash/root_window_controller.h | |
parent | b71876d4980bdb17cb929fa962685bdd03aea5e0 (diff) | |
download | chromium_src-23a2dc8da8b62b771ef4b0a803cd1e0dc2257d72.zip chromium_src-23a2dc8da8b62b771ef4b0a803cd1e0dc2257d72.tar.gz chromium_src-23a2dc8da8b62b771ef4b0a803cd1e0dc2257d72.tar.bz2 |
Refactors CaptureController so that both views and ash can use it.
CaptureController and DesktopCaptureClient differed only slightly, and
the latter wasn't always cleaning things up leading to the possibility
of a use after free. Specifically DesktopCaptureClient::SetCapture()
invokes OnOtherCaptureClientTookCapture() *after* updating the
capture_window_. SetCapture in term invokes SetCapture(NULL) on
the other DesktopCaptureClient, which call GetCaptureWindow(), which
returns the first non-null capture_client_, which can be the new one
when it wants the old one.
This change also means when both ash and aura-windows are running at
the same time capture is correctly updated between the two.
BUG=268648
TEST=covered by tests.
R=erg@chromium.org, oshima@chromium.org
Review URL: https://codereview.chromium.org/22929007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@219019 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/root_window_controller.h')
-rw-r--r-- | ash/root_window_controller.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ash/root_window_controller.h b/ash/root_window_controller.h index 140a7d2..d57aaf8 100644 --- a/ash/root_window_controller.h +++ b/ash/root_window_controller.h @@ -33,6 +33,7 @@ class Widget; namespace corewm { class InputMethodEventFilter; class RootWindowEventFilter; +class ScopedCaptureClient; } } @@ -281,6 +282,7 @@ class ASH_EXPORT RootWindowController : public ShellObserver { scoped_ptr<DesktopBackgroundWidgetController> wallpaper_controller_; scoped_ptr<AnimatingDesktopController> animating_wallpaper_controller_; + scoped_ptr<views::corewm::ScopedCaptureClient> capture_client_; DISALLOW_COPY_AND_ASSIGN(RootWindowController); }; |