Index: chrome/browser/resource_throttle.h |
diff --git a/chrome/browser/resource_throttle.h b/chrome/browser/resource_throttle.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..bb52b2be40aa63fb7751672de32a1d46a09fb9da |
--- /dev/null |
+++ b/chrome/browser/resource_throttle.h |
@@ -0,0 +1,39 @@ |
+// Copyright (c) 2014 The Chromium Authors. All rights reserved. |
Avi (use Gerrit)
2014/05/20 14:41:39
No (c)
|
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CHROME_BROWSER_RESOURCE_THROTTLE_H_ |
+#define CHROME_BROWSER_RESOURCE_THROTTLE_H_ |
+ |
+#include "base/basictypes.h" |
+#include "base/compiler_specific.h" |
+#include "chrome/browser/media/media_capture_devices_dispatcher.h" |
+#include "content/public/browser/web_contents_observer.h" |
+#include "content/public/browser/web_contents_user_data.h" |
+ |
+class ResourceThrottle |
tonyg
2014/05/20 14:14:52
Kari and I have been talking a lot about how to so
aiolos (Not reviewing)
2014/05/20 17:45:23
I agree with Tony that you'll want to move this to
|
+ : public content::WebContentsUserData<ResourceThrottle>, |
+ content::WebContentsObserver, |
+ MediaCaptureDevicesDispatcher::Observer { |
+ public: |
+ virtual ~ResourceThrottle(); |
+ |
+ // From WebContentsObserver . |
Avi (use Gerrit)
2014/05/20 14:41:39
Why the space before the .? (here and below too)
|
+ virtual void WasShown() OVERRIDE; |
+ virtual void WasHidden() OVERRIDE; |
+ |
+ // From MediaCaptureDevicesDispatcher::Observer . |
+ virtual void OnCreatingAudioStream(int render_process_id, |
+ int render_frame_id) OVERRIDE; |
+ |
+ private: |
+ void SetTimerCoalescingEnabled(bool enabled); |
+ |
+ explicit ResourceThrottle(content::WebContents* contents); |
+ friend class content::WebContentsUserData<ResourceThrottle>; |
+ |
+ content::WebContents* contents_; |
+ bool timer_coalescing_enabled_; |
+}; |
+ |
+#endif // CHROME_BROWSER_RESOURCE_THROTTLE_H_ |