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

Unified Diff: Source/core/events/NavigatorEvents.cpp

Issue 27750002: Add navigator.maxTouchPoints (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add null checks; fix test failure Created 7 years, 2 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/events/NavigatorEvents.h ('k') | Source/core/events/NavigatorEvents.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/events/NavigatorEvents.cpp
diff --git a/Source/modules/quota/StorageErrorCallback.cpp b/Source/core/events/NavigatorEvents.cpp
similarity index 79%
copy from Source/modules/quota/StorageErrorCallback.cpp
copy to Source/core/events/NavigatorEvents.cpp
index b73a122da03574292095f247c3add42c6f58ba8c..a9f9a26e21c25b5ddaa71504eb8ae0af46fbcc52 100644
--- a/Source/modules/quota/StorageErrorCallback.cpp
+++ b/Source/core/events/NavigatorEvents.cpp
@@ -29,24 +29,28 @@
*/
#include "config.h"
+#include "core/events/NavigatorEvents.h"
-#include "modules/quota/StorageErrorCallback.h"
-
-#include "core/dom/DOMError.h"
+#include "core/frame/Frame.h"
+#include "core/frame/Navigator.h"
+#include "core/page/Page.h"
+#include "core/page/Settings.h"
namespace WebCore {
-StorageErrorCallback::CallbackTask::CallbackTask(PassRefPtr<StorageErrorCallback> callback, ExceptionCode ec)
- : m_callback(callback)
- , m_ec(ec)
+long NavigatorEvents::maxTouchPoints(Navigator* navigator)
{
-}
+ Frame* frame = navigator->frame();
-void StorageErrorCallback::CallbackTask::performTask(ExecutionContext*)
-{
- if (!m_callback)
- return;
- m_callback->handleEvent(DOMError::create(m_ec).get());
+ if (!frame)
+ return 0;
+
+ Page* page = frame->page();
+
+ if (!page)
+ return 0;
+
+ return page->settings().maxTouchPoints();
}
} // namespace WebCore
« no previous file with comments | « Source/core/events/NavigatorEvents.h ('k') | Source/core/events/NavigatorEvents.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698