| 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 "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/lazy_instance.h" | 8 #include "base/lazy_instance.h" |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "content/browser/child_process_security_policy_impl.h" | 10 #include "content/browser/child_process_security_policy_impl.h" |
| (...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 439 if (pending_) | 439 if (pending_) |
| 440 pending_->InspectElement(x, y); | 440 pending_->InspectElement(x, y); |
| 441 } | 441 } |
| 442 | 442 |
| 443 void RenderFrameDevToolsAgentHost::OnClientAttached() { | 443 void RenderFrameDevToolsAgentHost::OnClientAttached() { |
| 444 if (!web_contents()) | 444 if (!web_contents()) |
| 445 return; | 445 return; |
| 446 | 446 |
| 447 frame_trace_recorder_.reset(new DevToolsFrameTraceRecorder()); | 447 frame_trace_recorder_.reset(new DevToolsFrameTraceRecorder()); |
| 448 | 448 |
| 449 #if defined(OS_ANDROID) | 449 //TODO(mfomitchev): Support PowerSaveBlocker on Aura - crbug.com/546718. |
| 450 #if defined(OS_ANDROID) && !defined(USE_AURA) |
| 450 power_save_blocker_.reset(static_cast<PowerSaveBlockerImpl*>( | 451 power_save_blocker_.reset(static_cast<PowerSaveBlockerImpl*>( |
| 451 PowerSaveBlocker::Create( | 452 PowerSaveBlocker::Create( |
| 452 PowerSaveBlocker::kPowerSaveBlockPreventDisplaySleep, | 453 PowerSaveBlocker::kPowerSaveBlockPreventDisplaySleep, |
| 453 PowerSaveBlocker::kReasonOther, "DevTools").release())); | 454 PowerSaveBlocker::kReasonOther, "DevTools").release())); |
| 454 power_save_blocker_->InitDisplaySleepBlocker(web_contents()); | 455 power_save_blocker_->InitDisplaySleepBlocker(web_contents()); |
| 455 #endif | 456 #endif |
| 456 | 457 |
| 457 // TODO(kaznacheev): Move this call back to DevToolsManager when | 458 // TODO(kaznacheev): Move this call back to DevToolsManager when |
| 458 // extensions::ProcessManager no longer relies on this notification. | 459 // extensions::ProcessManager no longer relies on this notification. |
| 459 DevToolsAgentHostImpl::NotifyCallbacks(this, true); | 460 DevToolsAgentHostImpl::NotifyCallbacks(this, true); |
| (...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 739 RenderFrameHost* host) { | 740 RenderFrameHost* host) { |
| 740 return (current_ && current_->host() == host) || | 741 return (current_ && current_->host() == host) || |
| 741 (pending_ && pending_->host() == host); | 742 (pending_ && pending_->host() == host); |
| 742 } | 743 } |
| 743 | 744 |
| 744 bool RenderFrameDevToolsAgentHost::IsChildFrame() { | 745 bool RenderFrameDevToolsAgentHost::IsChildFrame() { |
| 745 return current_ && current_->host()->GetParent(); | 746 return current_ && current_->host()->GetParent(); |
| 746 } | 747 } |
| 747 | 748 |
| 748 } // namespace content | 749 } // namespace content |
| OLD | NEW |