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 "content/renderer/render_view_impl.h" | 5 #include "content/renderer/render_view_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <cmath> | 8 #include <cmath> |
9 #include <memory> | 9 #include <memory> |
10 | 10 |
(...skipping 2492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2503 } | 2503 } |
2504 case TAP_MULTIPLE_TARGETS_STRATEGY_NONE: | 2504 case TAP_MULTIPLE_TARGETS_STRATEGY_NONE: |
2505 // No-op. | 2505 // No-op. |
2506 break; | 2506 break; |
2507 } | 2507 } |
2508 | 2508 |
2509 return handled; | 2509 return handled; |
2510 } | 2510 } |
2511 | 2511 |
2512 void RenderViewImpl::SuspendVideoCaptureDevices(bool suspend) { | 2512 void RenderViewImpl::SuspendVideoCaptureDevices(bool suspend) { |
| 2513 #if BUILDFLAG(ENABLE_WEBRTC) |
2513 if (!main_render_frame_) | 2514 if (!main_render_frame_) |
2514 return; | 2515 return; |
2515 | 2516 |
2516 MediaStreamDispatcher* media_stream_dispatcher = | 2517 MediaStreamDispatcher* media_stream_dispatcher = |
2517 main_render_frame_->GetMediaStreamDispatcher(); | 2518 main_render_frame_->GetMediaStreamDispatcher(); |
2518 if (!media_stream_dispatcher) | 2519 if (!media_stream_dispatcher) |
2519 return; | 2520 return; |
2520 | 2521 |
2521 StreamDeviceInfoArray video_array = | 2522 StreamDeviceInfoArray video_array = |
2522 media_stream_dispatcher->GetNonScreenCaptureDevices(); | 2523 media_stream_dispatcher->GetNonScreenCaptureDevices(); |
2523 RenderThreadImpl::current()->video_capture_impl_manager()->SuspendDevices( | 2524 RenderThreadImpl::current()->video_capture_impl_manager()->SuspendDevices( |
2524 video_array, suspend); | 2525 video_array, suspend); |
| 2526 #endif // BUILDFLAG(ENABLE_WEBRTC) |
2525 } | 2527 } |
2526 #endif // defined(OS_ANDROID) | 2528 #endif // defined(OS_ANDROID) |
2527 | 2529 |
2528 unsigned RenderViewImpl::GetLocalSessionHistoryLengthForTesting() const { | 2530 unsigned RenderViewImpl::GetLocalSessionHistoryLengthForTesting() const { |
2529 return history_list_length_; | 2531 return history_list_length_; |
2530 } | 2532 } |
2531 | 2533 |
2532 void RenderViewImpl::SetFocusAndActivateForTesting(bool enable) { | 2534 void RenderViewImpl::SetFocusAndActivateForTesting(bool enable) { |
2533 if (enable) { | 2535 if (enable) { |
2534 if (has_focus()) | 2536 if (has_focus()) |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2672 INPUT_EVENT_ACK_STATE_NOT_CONSUMED); | 2674 INPUT_EVENT_ACK_STATE_NOT_CONSUMED); |
2673 } | 2675 } |
2674 | 2676 |
2675 std::unique_ptr<InputEventAck> ack(new InputEventAck( | 2677 std::unique_ptr<InputEventAck> ack(new InputEventAck( |
2676 InputEventAckSource::MAIN_THREAD, input_event->GetType(), | 2678 InputEventAckSource::MAIN_THREAD, input_event->GetType(), |
2677 INPUT_EVENT_ACK_STATE_NOT_CONSUMED)); | 2679 INPUT_EVENT_ACK_STATE_NOT_CONSUMED)); |
2678 OnInputEventAck(std::move(ack)); | 2680 OnInputEventAck(std::move(ack)); |
2679 } | 2681 } |
2680 | 2682 |
2681 } // namespace content | 2683 } // namespace content |
OLD | NEW |