OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 #include "content/renderer/render_frame_impl.h" | 5 #include "content/renderer/render_frame_impl.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 4596 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4607 info.extraData | 4607 info.extraData |
4608 ? static_cast<DocumentState*>(info.extraData) | 4608 ? static_cast<DocumentState*>(info.extraData) |
4609 ->navigation_state() | 4609 ->navigation_state() |
4610 ->IsContentInitiated() | 4610 ->IsContentInitiated() |
4611 : !IsBrowserInitiated(pending_navigation_params_.get()); | 4611 : !IsBrowserInitiated(pending_navigation_params_.get()); |
4612 bool is_redirect = | 4612 bool is_redirect = |
4613 info.extraData || | 4613 info.extraData || |
4614 (pending_navigation_params_ && | 4614 (pending_navigation_params_ && |
4615 !pending_navigation_params_->request_params.redirects.empty()); | 4615 !pending_navigation_params_->request_params.redirects.empty()); |
4616 | 4616 |
| 4617 #ifdef OS_ANDROID |
| 4618 // The handlenavigation API is deprecated and will be removed once |
| 4619 // crbug.com/325351 is resolved. |
| 4620 if (info.urlRequest.url() != GURL(kSwappedOutURL) && |
| 4621 GetContentClient()->renderer()->HandleNavigation( |
| 4622 this, is_content_initiated, render_view_->opener_id_, frame_, |
| 4623 info.urlRequest, info.navigationType, info.defaultPolicy, |
| 4624 is_redirect)) { |
| 4625 return blink::WebNavigationPolicyIgnore; |
| 4626 } |
| 4627 #endif |
| 4628 |
4617 Referrer referrer( | 4629 Referrer referrer( |
4618 RenderViewImpl::GetReferrerFromRequest(frame_, info.urlRequest)); | 4630 RenderViewImpl::GetReferrerFromRequest(frame_, info.urlRequest)); |
4619 | 4631 |
4620 // TODO(nick): Is consulting |is_main_frame| here correct? | 4632 // TODO(nick): Is consulting |is_main_frame| here correct? |
4621 if (SiteIsolationPolicy::IsSwappedOutStateForbidden() && !is_main_frame_) { | 4633 if (SiteIsolationPolicy::IsSwappedOutStateForbidden() && !is_main_frame_) { |
4622 // There's no reason to ignore navigations on subframes, since the swap out | 4634 // There's no reason to ignore navigations on subframes, since the swap out |
4623 // logic no longer applies. | 4635 // logic no longer applies. |
4624 } else { | 4636 } else { |
4625 if (is_swapped_out_) { | 4637 if (is_swapped_out_) { |
4626 if (info.urlRequest.url() != GURL(kSwappedOutURL)) { | 4638 if (info.urlRequest.url() != GURL(kSwappedOutURL)) { |
(...skipping 1062 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5689 media::ConvertToSwitchOutputDeviceCB(web_callbacks); | 5701 media::ConvertToSwitchOutputDeviceCB(web_callbacks); |
5690 scoped_refptr<media::AudioOutputDevice> device = | 5702 scoped_refptr<media::AudioOutputDevice> device = |
5691 AudioDeviceFactory::NewOutputDevice(routing_id_, 0, sink_id.utf8(), | 5703 AudioDeviceFactory::NewOutputDevice(routing_id_, 0, sink_id.utf8(), |
5692 security_origin); | 5704 security_origin); |
5693 media::OutputDeviceStatus status = device->GetDeviceStatus(); | 5705 media::OutputDeviceStatus status = device->GetDeviceStatus(); |
5694 device->Stop(); | 5706 device->Stop(); |
5695 callback.Run(status); | 5707 callback.Run(status); |
5696 } | 5708 } |
5697 | 5709 |
5698 } // namespace content | 5710 } // namespace content |
OLD | NEW |