Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(189)

Side by Side Diff: ash/wm/video_detector.h

Issue 645513008: Standardize usage of virtual/override/final specifiers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ash/wm/toplevel_window_event_handler_unittest.cc ('k') | ash/wm/video_detector_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef ASH_WM_VIDEO_DETECTOR_H_ 5 #ifndef ASH_WM_VIDEO_DETECTOR_H_
6 #define ASH_WM_VIDEO_DETECTOR_H_ 6 #define ASH_WM_VIDEO_DETECTOR_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "ash/ash_export.h" 10 #include "ash/ash_export.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 51
52 // Number of video-sized updates that we must see within a second in a window 52 // Number of video-sized updates that we must see within a second in a window
53 // before we assume that a video is playing. 53 // before we assume that a video is playing.
54 static const int kMinFramesPerSecond; 54 static const int kMinFramesPerSecond;
55 55
56 // Minimum amount of time between notifications to observers that a video is 56 // Minimum amount of time between notifications to observers that a video is
57 // playing. 57 // playing.
58 static const double kNotifyIntervalSec; 58 static const double kNotifyIntervalSec;
59 59
60 VideoDetector(); 60 VideoDetector();
61 virtual ~VideoDetector(); 61 ~VideoDetector() override;
62 62
63 void set_now_for_test(base::TimeTicks now) { now_for_test_ = now; } 63 void set_now_for_test(base::TimeTicks now) { now_for_test_ = now; }
64 64
65 void AddObserver(VideoDetectorObserver* observer); 65 void AddObserver(VideoDetectorObserver* observer);
66 void RemoveObserver(VideoDetectorObserver* observer); 66 void RemoveObserver(VideoDetectorObserver* observer);
67 67
68 // EnvObserver overrides. 68 // EnvObserver overrides.
69 virtual void OnWindowInitialized(aura::Window* window) override; 69 void OnWindowInitialized(aura::Window* window) override;
70 70
71 // WindowObserver overrides. 71 // WindowObserver overrides.
72 virtual void OnDelegatedFrameDamage(aura::Window* window, 72 void OnDelegatedFrameDamage(aura::Window* window,
73 const gfx::Rect& region) override; 73 const gfx::Rect& region) override;
74 virtual void OnWindowDestroyed(aura::Window* window) override; 74 void OnWindowDestroyed(aura::Window* window) override;
75 75
76 // ShellObserver overrides. 76 // ShellObserver overrides.
77 virtual void OnAppTerminating() override; 77 void OnAppTerminating() override;
78 78
79 private: 79 private:
80 class WindowInfo; 80 class WindowInfo;
81 typedef std::map<aura::Window*, linked_ptr<WindowInfo> > WindowInfoMap; 81 typedef std::map<aura::Window*, linked_ptr<WindowInfo> > WindowInfoMap;
82 82
83 // Possibly notifies observers in response to detection of a video in 83 // Possibly notifies observers in response to detection of a video in
84 // |window|. Notifications are rate-limited and don't get sent if the window 84 // |window|. Notifications are rate-limited and don't get sent if the window
85 // is invisible or offscreen. 85 // is invisible or offscreen.
86 void MaybeNotifyObservers(aura::Window* window, base::TimeTicks now); 86 void MaybeNotifyObservers(aura::Window* window, base::TimeTicks now);
87 87
(...skipping 12 matching lines...) Expand all
100 ScopedObserver<aura::Window, aura::WindowObserver> observer_manager_; 100 ScopedObserver<aura::Window, aura::WindowObserver> observer_manager_;
101 101
102 bool is_shutting_down_; 102 bool is_shutting_down_;
103 103
104 DISALLOW_COPY_AND_ASSIGN(VideoDetector); 104 DISALLOW_COPY_AND_ASSIGN(VideoDetector);
105 }; 105 };
106 106
107 } // namespace ash 107 } // namespace ash
108 108
109 #endif // ASH_WM_VIDEO_DETECTOR_H_ 109 #endif // ASH_WM_VIDEO_DETECTOR_H_
OLDNEW
« no previous file with comments | « ash/wm/toplevel_window_event_handler_unittest.cc ('k') | ash/wm/video_detector_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698