summaryrefslogtreecommitdiffstats
path: root/ash/wm/video_detector.h
diff options
context:
space:
mode:
authoroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-26 21:45:04 +0000
committeroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-26 21:45:04 +0000
commit37afa1362b96c4c39b8723473f5d166dd225df5c (patch)
tree3f2afc62ac60eee85753f492da0ba1a702af3091 /ash/wm/video_detector.h
parent6480bf846084019f23715824a9d355cda2ef9556 (diff)
downloadchromium_src-37afa1362b96c4c39b8723473f5d166dd225df5c.zip
chromium_src-37afa1362b96c4c39b8723473f5d166dd225df5c.tar.gz
chromium_src-37afa1362b96c4c39b8723473f5d166dd225df5c.tar.bz2
Don't check video activity during shutdown
This also change to use ShellObserver to stop listening display change event BUG=231696 TEST=none Review URL: https://chromiumcodereview.appspot.com/14502004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@196843 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/wm/video_detector.h')
-rw-r--r--ash/wm/video_detector.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/ash/wm/video_detector.h b/ash/wm/video_detector.h
index 7b7de79..81fd2da 100644
--- a/ash/wm/video_detector.h
+++ b/ash/wm/video_detector.h
@@ -8,6 +8,7 @@
#include <map>
#include "ash/ash_export.h"
+#include "ash/shell_observer.h"
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/memory/linked_ptr.h"
@@ -40,7 +41,8 @@ class ASH_EXPORT VideoDetectorObserver {
// We err on the side of false positives and can be fooled by things like
// continuous scrolling of a page.
class ASH_EXPORT VideoDetector : public aura::EnvObserver,
- public aura::WindowObserver {
+ public aura::WindowObserver,
+ public ShellObserver {
public:
// Minimum dimensions in pixels that a window update must have to be
// considered a potential video frame.
@@ -71,6 +73,9 @@ class ASH_EXPORT VideoDetector : public aura::EnvObserver,
const gfx::Rect& region) OVERRIDE;
virtual void OnWindowDestroyed(aura::Window* window) OVERRIDE;
+ // ShellObserver overrides.
+ virtual void OnAppTerminating() OVERRIDE;
+
private:
class WindowInfo;
typedef std::map<aura::Window*, linked_ptr<WindowInfo> > WindowInfoMap;
@@ -94,6 +99,8 @@ class ASH_EXPORT VideoDetector : public aura::EnvObserver,
ScopedObserver<aura::Window, aura::WindowObserver> observer_manager_;
+ bool is_shutting_down_;
+
DISALLOW_COPY_AND_ASSIGN(VideoDetector);
};