| 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 <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 474 if (pending_) | 474 if (pending_) |
| 475 pending_->InspectElement(x, y); | 475 pending_->InspectElement(x, y); |
| 476 } | 476 } |
| 477 | 477 |
| 478 void RenderFrameDevToolsAgentHost::OnClientAttached() { | 478 void RenderFrameDevToolsAgentHost::OnClientAttached() { |
| 479 if (!web_contents()) | 479 if (!web_contents()) |
| 480 return; | 480 return; |
| 481 | 481 |
| 482 frame_trace_recorder_.reset(new DevToolsFrameTraceRecorder()); | 482 frame_trace_recorder_.reset(new DevToolsFrameTraceRecorder()); |
| 483 | 483 |
| 484 #if defined(OS_ANDROID) && !defined(USE_AURA) | 484 #if defined(OS_ANDROID) |
| 485 power_save_blocker_.reset(static_cast<PowerSaveBlockerImpl*>( | 485 power_save_blocker_.reset(static_cast<PowerSaveBlockerImpl*>( |
| 486 PowerSaveBlocker::Create( | 486 PowerSaveBlocker::Create( |
| 487 PowerSaveBlocker::kPowerSaveBlockPreventDisplaySleep, | 487 PowerSaveBlocker::kPowerSaveBlockPreventDisplaySleep, |
| 488 PowerSaveBlocker::kReasonOther, "DevTools").release())); | 488 PowerSaveBlocker::kReasonOther, "DevTools").release())); |
| 489 power_save_blocker_->InitDisplaySleepBlocker(web_contents()); | 489 power_save_blocker_->InitDisplaySleepBlocker(web_contents()); |
| 490 #endif | 490 #endif |
| 491 | 491 |
| 492 // TODO(kaznacheev): Move this call back to DevToolsManager when | 492 // TODO(kaznacheev): Move this call back to DevToolsManager when |
| 493 // extensions::ProcessManager no longer relies on this notification. | 493 // extensions::ProcessManager no longer relies on this notification. |
| 494 DevToolsAgentHostImpl::NotifyCallbacks(this, true); | 494 DevToolsAgentHostImpl::NotifyCallbacks(this, true); |
| (...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 867 } | 867 } |
| 868 | 868 |
| 869 bool RenderFrameDevToolsAgentHost::MatchesMyTreeNode( | 869 bool RenderFrameDevToolsAgentHost::MatchesMyTreeNode( |
| 870 NavigationHandle* navigation_handle) { | 870 NavigationHandle* navigation_handle) { |
| 871 return frame_tree_node_ == | 871 return frame_tree_node_ == |
| 872 static_cast<NavigationHandleImpl*>(navigation_handle) | 872 static_cast<NavigationHandleImpl*>(navigation_handle) |
| 873 ->frame_tree_node(); | 873 ->frame_tree_node(); |
| 874 } | 874 } |
| 875 | 875 |
| 876 } // namespace content | 876 } // namespace content |
| OLD | NEW |