| 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/browser/devtools/render_frame_devtools_agent_host.h" | 5 #include "content/browser/devtools/render_frame_devtools_agent_host.h" |
| 6 | 6 |
| 7 #include <tuple> | 7 #include <tuple> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/guid.h" | 10 #include "base/guid.h" |
| (...skipping 808 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 819 if (IsBrowserSideNavigationEnabled()) | 819 if (IsBrowserSideNavigationEnabled()) |
| 820 return true; | 820 return true; |
| 821 if (!frame_tree_node_) | 821 if (!frame_tree_node_) |
| 822 return !handlers_frame_host_; | 822 return !handlers_frame_host_; |
| 823 RenderFrameHostManager* manager = frame_tree_node_->render_manager(); | 823 RenderFrameHostManager* manager = frame_tree_node_->render_manager(); |
| 824 return handlers_frame_host_ == manager->current_frame_host() || | 824 return handlers_frame_host_ == manager->current_frame_host() || |
| 825 handlers_frame_host_ == manager->pending_frame_host(); | 825 handlers_frame_host_ == manager->pending_frame_host(); |
| 826 } | 826 } |
| 827 | 827 |
| 828 #if defined(OS_ANDROID) | 828 #if defined(OS_ANDROID) |
| 829 device::mojom::WakeLockService* | 829 device::mojom::WakeLock* RenderFrameDevToolsAgentHost::GetWakeLockService() { |
| 830 RenderFrameDevToolsAgentHost::GetWakeLockService() { | |
| 831 // Here is a lazy binding, and will not reconnect after connection error. | 830 // Here is a lazy binding, and will not reconnect after connection error. |
| 832 if (!wake_lock_) { | 831 if (!wake_lock_) { |
| 833 device::mojom::WakeLockServiceRequest request = | 832 device::mojom::WakeLockRequest request = mojo::MakeRequest(&wake_lock_); |
| 834 mojo::MakeRequest(&wake_lock_); | |
| 835 device::mojom::WakeLockContext* wake_lock_context = | 833 device::mojom::WakeLockContext* wake_lock_context = |
| 836 web_contents()->GetWakeLockContext(); | 834 web_contents()->GetWakeLockContext(); |
| 837 if (wake_lock_context) { | 835 if (wake_lock_context) { |
| 838 wake_lock_context->GetWakeLock( | 836 wake_lock_context->GetWakeLock( |
| 839 device::mojom::WakeLockType::PreventDisplaySleep, | 837 device::mojom::WakeLockType::PreventDisplaySleep, |
| 840 device::mojom::WakeLockReason::ReasonOther, "DevTools", | 838 device::mojom::WakeLockReason::ReasonOther, "DevTools", |
| 841 std::move(request)); | 839 std::move(request)); |
| 842 } | 840 } |
| 843 } | 841 } |
| 844 return wake_lock_.get(); | 842 return wake_lock_.get(); |
| (...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1179 RenderFrameHost* host) { | 1177 RenderFrameHost* host) { |
| 1180 return (current_ && current_->host() == host) || | 1178 return (current_ && current_->host() == host) || |
| 1181 (pending_ && pending_->host() == host); | 1179 (pending_ && pending_->host() == host); |
| 1182 } | 1180 } |
| 1183 | 1181 |
| 1184 bool RenderFrameDevToolsAgentHost::IsChildFrame() { | 1182 bool RenderFrameDevToolsAgentHost::IsChildFrame() { |
| 1185 return current_ && current_->host()->GetParent(); | 1183 return current_ && current_->host()->GetParent(); |
| 1186 } | 1184 } |
| 1187 | 1185 |
| 1188 } // namespace content | 1186 } // namespace content |
| OLD | NEW |