Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(570)

Side by Side Diff: Source/core/inspector/InspectorDOMAgent.cpp

Issue 354023002: DevTools: disable DOMAgent when profiler is active (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2009 Apple Inc. All rights reserved.
3 * Copyright (C) 2011 Google Inc. All rights reserved. 3 * Copyright (C) 2011 Google Inc. All rights reserved.
4 * Copyright (C) 2009 Joseph Pecoraro 4 * Copyright (C) 2009 Joseph Pecoraro
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 9 *
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 return element; 486 return element;
487 } 487 }
488 488
489 void InspectorDOMAgent::enable(ErrorString*) 489 void InspectorDOMAgent::enable(ErrorString*)
490 { 490 {
491 if (enabled()) 491 if (enabled())
492 return; 492 return;
493 m_state->setBoolean(DOMAgentState::domAgentEnabled, true); 493 m_state->setBoolean(DOMAgentState::domAgentEnabled, true);
494 if (m_listener) 494 if (m_listener)
495 m_listener->domAgentWasEnabled(); 495 m_listener->domAgentWasEnabled();
496 restore();
pfeldman 2014/06/26 13:57:17 This seems wrong: getDocument -> enable -> restore
496 } 497 }
497 498
498 bool InspectorDOMAgent::enabled() const 499 bool InspectorDOMAgent::enabled() const
499 { 500 {
500 return m_state->getBoolean(DOMAgentState::domAgentEnabled); 501 return m_state->getBoolean(DOMAgentState::domAgentEnabled);
501 } 502 }
502 503
503 void InspectorDOMAgent::disable(ErrorString*) 504 void InspectorDOMAgent::disable(ErrorString*)
504 { 505 {
505 if (!enabled()) 506 if (!enabled())
(...skipping 1595 matching lines...) Expand 10 before | Expand all | Expand 10 after
2101 if (!m_documentNodeToIdMap->contains(m_document.get())) { 2102 if (!m_documentNodeToIdMap->contains(m_document.get())) {
2102 RefPtr<TypeBuilder::DOM::Node> root; 2103 RefPtr<TypeBuilder::DOM::Node> root;
2103 getDocument(errorString, root); 2104 getDocument(errorString, root);
2104 return errorString->isEmpty(); 2105 return errorString->isEmpty();
2105 } 2106 }
2106 return true; 2107 return true;
2107 } 2108 }
2108 2109
2109 } // namespace WebCore 2110 } // namespace WebCore
2110 2111
OLDNEW
« no previous file with comments | « no previous file | Source/devtools/front_end/sdk/DOMModel.js » ('j') | Source/devtools/front_end/sdk/DOMModel.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698