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

Unified Diff: Source/web/WebFrameWidgetImpl.cpp

Issue 1021083003: [DevTools] Pause input events in WebFrameWidgetImpl while debugging. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: typo Created 5 years, 9 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
« no previous file with comments | « Source/web/WebFrameWidgetImpl.h ('k') | Source/web/WebViewImpl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebFrameWidgetImpl.cpp
diff --git a/Source/web/WebFrameWidgetImpl.cpp b/Source/web/WebFrameWidgetImpl.cpp
index d4e90c8b30d050b6ce2109000e1b14aebe79f2ba..f4dcf27bac2c4f47252f5070b616636e005960f7 100644
--- a/Source/web/WebFrameWidgetImpl.cpp
+++ b/Source/web/WebFrameWidgetImpl.cpp
@@ -47,6 +47,7 @@
#include "platform/NotImplemented.h"
#include "public/web/WebBeginFrameArgs.h"
#include "public/web/WebWidgetClient.h"
+#include "web/WebDevToolsAgentImpl.h"
#include "web/WebInputEventConversion.h"
#include "web/WebLocalFrameImpl.h"
#include "web/WebPluginContainerImpl.h"
@@ -69,6 +70,13 @@ WebFrameWidgetImpl* WebFrameWidgetImpl::create(WebWidgetClient* client, WebLocal
return adoptRef(new WebFrameWidgetImpl(client, localRoot)).leakRef();
}
+// static
+HashSet<WebFrameWidgetImpl*>& WebFrameWidgetImpl::allInstances()
+{
+ DEFINE_STATIC_LOCAL(HashSet<WebFrameWidgetImpl*>, allInstances, ());
+ return allInstances;
+}
+
WebFrameWidgetImpl::WebFrameWidgetImpl(WebWidgetClient* client, WebLocalFrame* localRoot)
: m_client(client)
, m_localRoot(toWebLocalFrameImpl(localRoot))
@@ -85,6 +93,7 @@ WebFrameWidgetImpl::WebFrameWidgetImpl(WebWidgetClient* client, WebLocalFrame* l
ASSERT(m_localRoot->frame()->isLocalRoot());
initializeLayerTreeView();
m_localRoot->setFrameWidget(this);
+ allInstances().add(this);
}
WebFrameWidgetImpl::~WebFrameWidgetImpl()
@@ -95,6 +104,10 @@ WebFrameWidgetImpl::~WebFrameWidgetImpl()
void WebFrameWidgetImpl::close()
{
+ WebDevToolsAgentImpl::webFrameWidgetImplClosed(this);
+ ASSERT(allInstances().contains(this));
+ allInstances().remove(this);
+
// Reset the delegate to prevent notifications being sent as we're being
// deleted.
m_client = nullptr;
@@ -182,6 +195,12 @@ void WebFrameWidgetImpl::updateMainFrameLayoutSize()
view->setLayoutSize(layoutSize);
}
+void WebFrameWidgetImpl::setIgnoreInputEvents(bool newValue)
+{
+ ASSERT(m_ignoreInputEvents != newValue);
+ m_ignoreInputEvents = newValue;
+}
+
void WebFrameWidgetImpl::willEndLiveResize()
{
if (m_localRoot->frameView())
@@ -352,6 +371,8 @@ bool WebFrameWidgetImpl::handleInputEvent(const WebInputEvent& inputEvent)
if (m_ignoreInputEvents)
return false;
+ // FIXME: pass event to m_localRoot's WebDevToolsAgentImpl once available.
+
TemporaryChange<const WebInputEvent*> currentEventChange(m_currentInputEvent, &inputEvent);
if (m_mouseCaptureNode && WebInputEvent::isMouseEventType(inputEvent.type)) {
« no previous file with comments | « Source/web/WebFrameWidgetImpl.h ('k') | Source/web/WebViewImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698