OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010, Google Inc. All rights reserved. | 2 * Copyright (C) 2010, 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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
454 } | 454 } |
455 | 455 |
456 void InspectorCSSAgent::enable(ErrorString*, PassRefPtrWillBeRawPtr<EnableCallba
ck> prpCallback) | 456 void InspectorCSSAgent::enable(ErrorString*, PassRefPtrWillBeRawPtr<EnableCallba
ck> prpCallback) |
457 { | 457 { |
458 m_state->setBoolean(CSSAgentState::cssAgentEnabled, true); | 458 m_state->setBoolean(CSSAgentState::cssAgentEnabled, true); |
459 if (!m_pageAgent->resourceContentLoader()) { | 459 if (!m_pageAgent->resourceContentLoader()) { |
460 wasEnabled(); | 460 wasEnabled(); |
461 prpCallback->sendSuccess(); | 461 prpCallback->sendSuccess(); |
462 return; | 462 return; |
463 } | 463 } |
464 m_pageAgent->resourceContentLoader()->ensureResourcesContentLoaded(adoptPtrW
illBeNoop(new InspectorCSSAgent::InspectorResourceContentLoaderCallback(this, pr
pCallback))); | 464 m_pageAgent->resourceContentLoader()->ensureResourcesContentLoaded(new Inspe
ctorCSSAgent::InspectorResourceContentLoaderCallback(this, prpCallback)); |
465 } | 465 } |
466 | 466 |
467 void InspectorCSSAgent::wasEnabled() | 467 void InspectorCSSAgent::wasEnabled() |
468 { | 468 { |
469 if (!m_state->getBoolean(CSSAgentState::cssAgentEnabled)) { | 469 if (!m_state->getBoolean(CSSAgentState::cssAgentEnabled)) { |
470 // We were disabled while fetching resources. | 470 // We were disabled while fetching resources. |
471 return; | 471 return; |
472 } | 472 } |
473 | 473 |
474 m_instrumentingAgents->setInspectorCSSAgent(this); | 474 m_instrumentingAgents->setInspectorCSSAgent(this); |
(...skipping 992 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1467 visitor->trace(m_invalidatedDocuments); | 1467 visitor->trace(m_invalidatedDocuments); |
1468 visitor->trace(m_nodeToInspectorStyleSheet); | 1468 visitor->trace(m_nodeToInspectorStyleSheet); |
1469 visitor->trace(m_documentToViaInspectorStyleSheet); | 1469 visitor->trace(m_documentToViaInspectorStyleSheet); |
1470 #endif | 1470 #endif |
1471 visitor->trace(m_inspectorUserAgentStyleSheet); | 1471 visitor->trace(m_inspectorUserAgentStyleSheet); |
1472 InspectorBaseAgent::trace(visitor); | 1472 InspectorBaseAgent::trace(visitor); |
1473 } | 1473 } |
1474 | 1474 |
1475 } // namespace blink | 1475 } // namespace blink |
1476 | 1476 |
OLD | NEW |