| 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 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 429 if (pending_) | 429 if (pending_) |
| 430 pending_->InspectElement(x, y); | 430 pending_->InspectElement(x, y); |
| 431 } | 431 } |
| 432 | 432 |
| 433 void RenderFrameDevToolsAgentHost::OnClientAttached() { | 433 void RenderFrameDevToolsAgentHost::OnClientAttached() { |
| 434 if (!web_contents()) | 434 if (!web_contents()) |
| 435 return; | 435 return; |
| 436 | 436 |
| 437 frame_trace_recorder_.reset(new DevToolsFrameTraceRecorder()); | 437 frame_trace_recorder_.reset(new DevToolsFrameTraceRecorder()); |
| 438 | 438 |
| 439 #if defined(OS_ANDROID) | 439 #if defined(OS_ANDROID) && !defined(USE_AURA) |
| 440 power_save_blocker_.reset(static_cast<PowerSaveBlockerImpl*>( | 440 power_save_blocker_.reset(static_cast<PowerSaveBlockerImpl*>( |
| 441 PowerSaveBlocker::Create( | 441 PowerSaveBlocker::Create( |
| 442 PowerSaveBlocker::kPowerSaveBlockPreventDisplaySleep, | 442 PowerSaveBlocker::kPowerSaveBlockPreventDisplaySleep, |
| 443 PowerSaveBlocker::kReasonOther, "DevTools").release())); | 443 PowerSaveBlocker::kReasonOther, "DevTools").release())); |
| 444 power_save_blocker_->InitDisplaySleepBlocker(web_contents()); | 444 power_save_blocker_->InitDisplaySleepBlocker(web_contents()); |
| 445 #endif | 445 #endif |
| 446 | 446 |
| 447 // TODO(kaznacheev): Move this call back to DevToolsManager when | 447 // TODO(kaznacheev): Move this call back to DevToolsManager when |
| 448 // extensions::ProcessManager no longer relies on this notification. | 448 // extensions::ProcessManager no longer relies on this notification. |
| 449 DevToolsAgentHostImpl::NotifyCallbacks(this, true); | 449 DevToolsAgentHostImpl::NotifyCallbacks(this, true); |
| (...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 730 RenderFrameHost* host) { | 730 RenderFrameHost* host) { |
| 731 return (current_ && current_->host() == host) || | 731 return (current_ && current_->host() == host) || |
| 732 (pending_ && pending_->host() == host); | 732 (pending_ && pending_->host() == host); |
| 733 } | 733 } |
| 734 | 734 |
| 735 bool RenderFrameDevToolsAgentHost::IsChildFrame() { | 735 bool RenderFrameDevToolsAgentHost::IsChildFrame() { |
| 736 return current_ && current_->host()->GetParent(); | 736 return current_ && current_->host()->GetParent(); |
| 737 } | 737 } |
| 738 | 738 |
| 739 } // namespace content | 739 } // namespace content |
| OLD | NEW |