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

Unified Diff: third_party/WebKit/Source/web/InspectorOverlay.cpp

Issue 2189263004: [DevTools] Replace profiling{Started,Stopped} with explicit setOverlaySuspended call. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merged Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/web/InspectorOverlay.cpp
diff --git a/third_party/WebKit/Source/web/InspectorOverlay.cpp b/third_party/WebKit/Source/web/InspectorOverlay.cpp
index c818c11f6428ecfc87adb434c5829304af1b00d5..f1b569c54f7949307cc17a8ecb3014979bb66639 100644
--- a/third_party/WebKit/Source/web/InspectorOverlay.cpp
+++ b/third_party/WebKit/Source/web/InspectorOverlay.cpp
@@ -178,7 +178,7 @@ InspectorOverlay::InspectorOverlay(WebViewImpl* webViewImpl)
, m_resizeTimerActive(false)
, m_omitTooltip(false)
, m_timer(this, &InspectorOverlay::onTimer)
- , m_suspendCount(0)
+ , m_suspended(false)
, m_inLayout(false)
, m_needsUpdate(false)
, m_inspectMode(InspectorDOMAgent::NotSearching)
@@ -354,7 +354,7 @@ void InspectorOverlay::highlightQuad(std::unique_ptr<FloatQuad> quad, const Insp
bool InspectorOverlay::isEmpty()
{
- if (m_suspendCount)
+ if (m_suspended)
return true;
bool hasVisibleElements = m_highlightNode || m_eventTargetNode || m_highlightQuad || (m_resizeTimerActive && m_drawViewSize) || !m_pausedInDebuggerMessage.isNull();
return !hasVisibleElements && m_inspectMode == InspectorDOMAgent::NotSearching;
@@ -672,13 +672,15 @@ void InspectorOverlay::overlayClearSelection(bool commitChanges)
void InspectorOverlay::suspend()
{
- if (!m_suspendCount++)
+ if (!m_suspended) {
+ m_suspended = true;
clearInternal();
+ }
}
void InspectorOverlay::resume()
{
- --m_suspendCount;
+ m_suspended = false;
}
void InspectorOverlay::pageLayoutInvalidated(bool resized)
« no previous file with comments | « third_party/WebKit/Source/web/InspectorOverlay.h ('k') | third_party/WebKit/Source/web/WebDevToolsAgentImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698