OLD | NEW |
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 #include "chrome/renderer/chrome_content_renderer_client.h" | 5 #include "chrome/renderer/chrome_content_renderer_client.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 : content::RenderFrameObserver(render_frame), | 288 : content::RenderFrameObserver(render_frame), |
289 continue_loading_cb_(continue_loading_cb) {} | 289 continue_loading_cb_(continue_loading_cb) {} |
290 ~MediaLoadDeferrer() override {} | 290 ~MediaLoadDeferrer() override {} |
291 | 291 |
292 private: | 292 private: |
293 // content::RenderFrameObserver implementation: | 293 // content::RenderFrameObserver implementation: |
294 void WasShown() override { | 294 void WasShown() override { |
295 continue_loading_cb_.Run(); | 295 continue_loading_cb_.Run(); |
296 delete this; | 296 delete this; |
297 } | 297 } |
| 298 void OnDestruct() override { delete this; } |
298 | 299 |
299 const base::Closure continue_loading_cb_; | 300 const base::Closure continue_loading_cb_; |
300 | 301 |
301 DISALLOW_COPY_AND_ASSIGN(MediaLoadDeferrer); | 302 DISALLOW_COPY_AND_ASSIGN(MediaLoadDeferrer); |
302 }; | 303 }; |
303 | 304 |
304 } // namespace | 305 } // namespace |
305 | 306 |
306 ChromeContentRendererClient::ChromeContentRendererClient() | 307 ChromeContentRendererClient::ChromeContentRendererClient() |
307 : main_entry_time_(base::TimeTicks::Now()) { | 308 : main_entry_time_(base::TimeTicks::Now()) { |
(...skipping 1076 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1384 // chrome.system.network.getNetworkInterfaces provides the same | 1385 // chrome.system.network.getNetworkInterfaces provides the same |
1385 // information. Also, the enforcement of sending and binding UDP is already done | 1386 // information. Also, the enforcement of sending and binding UDP is already done |
1386 // by chrome extension permission model. | 1387 // by chrome extension permission model. |
1387 bool ChromeContentRendererClient::ShouldEnforceWebRTCRoutingPreferences() { | 1388 bool ChromeContentRendererClient::ShouldEnforceWebRTCRoutingPreferences() { |
1388 #if defined(ENABLE_EXTENSIONS) | 1389 #if defined(ENABLE_EXTENSIONS) |
1389 return !IsStandaloneExtensionProcess(); | 1390 return !IsStandaloneExtensionProcess(); |
1390 #else | 1391 #else |
1391 return true; | 1392 return true; |
1392 #endif | 1393 #endif |
1393 } | 1394 } |
OLD | NEW |