| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 CONTENT_BROWSER_WEBRTC_WEBRTC_INTERNALS_H_ | 5 #ifndef CONTENT_BROWSER_WEBRTC_WEBRTC_INTERNALS_H_ |
| 6 #define CONTENT_BROWSER_WEBRTC_WEBRTC_INTERNALS_H_ | 6 #define CONTENT_BROWSER_WEBRTC_WEBRTC_INTERNALS_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <queue> | 9 #include <queue> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 bool IsAudioDebugRecordingsEnabled() const; | 102 bool IsAudioDebugRecordingsEnabled() const; |
| 103 const base::FilePath& GetAudioDebugRecordingsFilePath() const; | 103 const base::FilePath& GetAudioDebugRecordingsFilePath() const; |
| 104 | 104 |
| 105 // Enables or disables diagnostic event log. | 105 // Enables or disables diagnostic event log. |
| 106 void EnableEventLogRecordings(content::WebContents* web_contents); | 106 void EnableEventLogRecordings(content::WebContents* web_contents); |
| 107 void DisableEventLogRecordings(); | 107 void DisableEventLogRecordings(); |
| 108 | 108 |
| 109 bool IsEventLogRecordingsEnabled() const; | 109 bool IsEventLogRecordingsEnabled() const; |
| 110 const base::FilePath& GetEventLogFilePath() const; | 110 const base::FilePath& GetEventLogFilePath() const; |
| 111 | 111 |
| 112 int num_open_connections() { return num_open_connections_; } | 112 int num_open_connections() const { return num_open_connections_; } |
| 113 bool IsPowerSavingBlocked() { return !!power_save_blocker_; } | 113 bool IsPowerSavingBlocked() const { return !!power_save_blocker_; } |
| 114 | 114 |
| 115 protected: | 115 protected: |
| 116 // Constructor/Destructor are protected to allow tests to derive from the | 116 // Constructor/Destructor are protected to allow tests to derive from the |
| 117 // class and do per-instance testing without having to use the global | 117 // class and do per-instance testing without having to use the global |
| 118 // instance. | 118 // instance. |
| 119 // The default ctor sets |aggregate_updates_ms| to 500ms. | 119 // The default ctor sets |aggregate_updates_ms| to 500ms. |
| 120 WebRTCInternals(); | 120 WebRTCInternals(); |
| 121 WebRTCInternals(int aggregate_updates_ms, bool should_block_power_saving); | 121 WebRTCInternals(int aggregate_updates_ms, bool should_block_power_saving); |
| 122 ~WebRTCInternals() override; | 122 ~WebRTCInternals() override; |
| 123 | 123 |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 std::queue<PendingUpdate> pending_updates_; | 249 std::queue<PendingUpdate> pending_updates_; |
| 250 const int aggregate_updates_ms_; | 250 const int aggregate_updates_ms_; |
| 251 | 251 |
| 252 // Weak factory for this object that we use for bulking up updates. | 252 // Weak factory for this object that we use for bulking up updates. |
| 253 base::WeakPtrFactory<WebRTCInternals> weak_factory_; | 253 base::WeakPtrFactory<WebRTCInternals> weak_factory_; |
| 254 }; | 254 }; |
| 255 | 255 |
| 256 } // namespace content | 256 } // namespace content |
| 257 | 257 |
| 258 #endif // CONTENT_BROWSER_WEBRTC_WEBRTC_INTERNALS_H_ | 258 #endif // CONTENT_BROWSER_WEBRTC_WEBRTC_INTERNALS_H_ |
| OLD | NEW |