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

Unified Diff: Source/core/css/MediaQueryListListener.cpp

Issue 396283004: Make the MediaQueryList listener an EventListener (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: . Created 6 years, 4 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/core/css/MediaQueryListListener.h ('k') | Source/core/css/MediaQueryListTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/MediaQueryListListener.cpp
diff --git a/Source/core/css/MediaQueryListListener.cpp b/Source/core/css/MediaQueryListListener.cpp
index 50f38ee019603c03a5c8381abcef52eb079ef2cf..946b2f5c7c8cb2ae54c6d2d1704c71631a096522 100644
--- a/Source/core/css/MediaQueryListListener.cpp
+++ b/Source/core/css/MediaQueryListListener.cpp
@@ -20,10 +20,6 @@
#include "config.h"
#include "core/css/MediaQueryListListener.h"
-#include "bindings/core/v8/ScriptController.h"
-#include "bindings/core/v8/V8MediaQueryList.h"
-#include <v8.h>
-
namespace blink {
MediaQueryListListener::MediaQueryListListener()
@@ -31,28 +27,8 @@ MediaQueryListListener::MediaQueryListListener()
// only for use by subclasses
}
-// FIXME: Rename MediaQueryListListener to something more generic, once it's no longer Web exposed.
-MediaQueryListListener::MediaQueryListListener(ScriptState* scriptState, const ScriptValue& function)
- : m_scriptState(scriptState)
- , m_function(function)
-{
- ASSERT(m_function.isFunction());
-}
-
MediaQueryListListener::~MediaQueryListListener()
{
}
-void MediaQueryListListener::call()
-{
- if (!m_query)
- return;
-
- if (m_scriptState->contextIsEmpty())
- return;
- ScriptState::Scope scope(m_scriptState.get());
- v8::Handle<v8::Value> args[] = { toV8(m_query.get(), m_scriptState->context()->Global(), m_scriptState->isolate()) };
- ScriptController::callFunction(m_scriptState->executionContext(), v8::Handle<v8::Function>::Cast(m_function.v8Value()), m_scriptState->context()->Global(), WTF_ARRAY_LENGTH(args), args, m_scriptState->isolate());
-}
-
}
« no previous file with comments | « Source/core/css/MediaQueryListListener.h ('k') | Source/core/css/MediaQueryListTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698