| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 } | 65 } |
| 66 | 66 |
| 67 DEFINE_TRACE(PageDebuggerAgent) | 67 DEFINE_TRACE(PageDebuggerAgent) |
| 68 { | 68 { |
| 69 visitor->trace(m_pageScriptDebugServer); | 69 visitor->trace(m_pageScriptDebugServer); |
| 70 visitor->trace(m_pageAgent); | 70 visitor->trace(m_pageAgent); |
| 71 visitor->trace(m_overlay); | 71 visitor->trace(m_overlay); |
| 72 InspectorDebuggerAgent::trace(visitor); | 72 InspectorDebuggerAgent::trace(visitor); |
| 73 } | 73 } |
| 74 | 74 |
| 75 void PageDebuggerAgent::enable() | 75 bool PageDebuggerAgent::enable() |
| 76 { | 76 { |
| 77 InspectorDebuggerAgent::enable(); | 77 bool result = InspectorDebuggerAgent::enable(); |
| 78 m_instrumentingAgents->setPageDebuggerAgent(this); | 78 if (result) |
| 79 m_instrumentingAgents->setPageDebuggerAgent(this); |
| 80 return result; |
| 79 } | 81 } |
| 80 | 82 |
| 81 void PageDebuggerAgent::disable() | 83 void PageDebuggerAgent::disable() |
| 82 { | 84 { |
| 83 InspectorDebuggerAgent::disable(); | 85 InspectorDebuggerAgent::disable(); |
| 84 m_instrumentingAgents->setPageDebuggerAgent(0); | 86 m_instrumentingAgents->setPageDebuggerAgent(0); |
| 85 } | 87 } |
| 86 | 88 |
| 87 void PageDebuggerAgent::startListeningScriptDebugServer() | 89 bool PageDebuggerAgent::startListeningScriptDebugServer() |
| 88 { | 90 { |
| 89 scriptDebugServer().addListener(this, m_pageAgent->inspectedFrame(), m_debug
gerId); | 91 return scriptDebugServer().addListener(this, m_pageAgent->inspectedFrame(),
m_debuggerId); |
| 90 } | 92 } |
| 91 | 93 |
| 92 void PageDebuggerAgent::stopListeningScriptDebugServer() | 94 void PageDebuggerAgent::stopListeningScriptDebugServer() |
| 93 { | 95 { |
| 94 scriptDebugServer().removeListener(this, m_pageAgent->inspectedFrame()); | 96 scriptDebugServer().removeListener(this, m_pageAgent->inspectedFrame()); |
| 95 } | 97 } |
| 96 | 98 |
| 97 PageScriptDebugServer& PageDebuggerAgent::scriptDebugServer() | 99 PageScriptDebugServer& PageDebuggerAgent::scriptDebugServer() |
| 98 { | 100 { |
| 99 return *m_pageScriptDebugServer; | 101 return *m_pageScriptDebugServer; |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 return; | 153 return; |
| 152 reset(); | 154 reset(); |
| 153 } | 155 } |
| 154 | 156 |
| 155 void PageDebuggerAgent::didCommitLoadForLocalFrame(LocalFrame*) | 157 void PageDebuggerAgent::didCommitLoadForLocalFrame(LocalFrame*) |
| 156 { | 158 { |
| 157 resetModifiedSources(); | 159 resetModifiedSources(); |
| 158 } | 160 } |
| 159 | 161 |
| 160 } // namespace blink | 162 } // namespace blink |
| OLD | NEW |