<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[180533] trunk/Source/WebCore</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/180533">180533</a></dd>
<dt>Author</dt> <dd>cdumez@apple.com</dd>
<dt>Date</dt> <dd>2015-02-23 16:49:49 -0800 (Mon, 23 Feb 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Move GeoNotifier class to its own file
https://bugs.webkit.org/show_bug.cgi?id=141918

Reviewed by Andreas Kling.

Move GeoNotifier class to its own file to make Geolocation class less
crowded.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreCMakeListstxt">trunk/Source/WebCore/CMakeLists.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreModulesgeolocationGeolocationcpp">trunk/Source/WebCore/Modules/geolocation/Geolocation.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesgeolocationGeolocationh">trunk/Source/WebCore/Modules/geolocation/Geolocation.h</a></li>
<li><a href="#trunkSourceWebCoreWebCorevcxprojWebCorevcxproj">trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj</a></li>
<li><a href="#trunkSourceWebCoreWebCorevcxprojWebCorevcxprojfilters">trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreModulesgeolocationGeoNotifiercpp">trunk/Source/WebCore/Modules/geolocation/GeoNotifier.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesgeolocationGeoNotifierh">trunk/Source/WebCore/Modules/geolocation/GeoNotifier.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/CMakeLists.txt (180532 => 180533)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/CMakeLists.txt        2015-02-24 00:24:48 UTC (rev 180532)
+++ trunk/Source/WebCore/CMakeLists.txt        2015-02-24 00:49:49 UTC (rev 180533)
</span><span class="lines">@@ -805,6 +805,7 @@
</span><span class="cx">     Modules/gamepad/deprecated/NavigatorGamepad.cpp
</span><span class="cx"> 
</span><span class="cx">     Modules/geolocation/Coordinates.cpp
</span><ins>+    Modules/geolocation/GeoNotifier.cpp
</ins><span class="cx">     Modules/geolocation/Geolocation.cpp
</span><span class="cx">     Modules/geolocation/GeolocationController.cpp
</span><span class="cx">     Modules/geolocation/NavigatorGeolocation.cpp
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (180532 => 180533)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-02-24 00:24:48 UTC (rev 180532)
+++ trunk/Source/WebCore/ChangeLog        2015-02-24 00:49:49 UTC (rev 180533)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+2015-02-23  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        Move GeoNotifier class to its own file
+        https://bugs.webkit.org/show_bug.cgi?id=141918
+
+        Reviewed by Andreas Kling.
+
+        Move GeoNotifier class to its own file to make Geolocation class less
+        crowded.
+
</ins><span class="cx"> 2015-02-23  Gyuyoung Kim  &lt;gyuyoung.kim@samsung.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Remove unnecessary PlatformTimeRanges::create()
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesgeolocationGeoNotifiercpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/Modules/geolocation/GeoNotifier.cpp (0 => 180533)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/geolocation/GeoNotifier.cpp                                (rev 0)
+++ trunk/Source/WebCore/Modules/geolocation/GeoNotifier.cpp        2015-02-24 00:49:49 UTC (rev 180533)
</span><span class="lines">@@ -0,0 +1,133 @@
</span><ins>+/*
+ * Copyright (C) 2008-2011, 2015 Apple Inc. All Rights Reserved.
+ * Copyright (C) 2009 Torch Mobile, Inc.
+ * Copyright 2010, The Android Open Source Project
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include &quot;config.h&quot;
+#include &quot;GeoNotifier.h&quot;
+
+#include &quot;Geolocation.h&quot;
+
+namespace WebCore {
+
+GeoNotifier::GeoNotifier(Geolocation&amp; geolocation, PassRefPtr&lt;PositionCallback&gt; successCallback, PassRefPtr&lt;PositionErrorCallback&gt; errorCallback, PassRefPtr&lt;PositionOptions&gt; options)
+    : m_geolocation(geolocation)
+    , m_successCallback(successCallback)
+    , m_errorCallback(errorCallback)
+    , m_options(options)
+    , m_timer(*this, &amp;GeoNotifier::timerFired)
+    , m_useCachedPosition(false)
+{
+    ASSERT(m_successCallback);
+    // If no options were supplied from JS, we should have created a default set
+    // of options in JSGeolocationCustom.cpp.
+    ASSERT(m_options);
+}
+
+void GeoNotifier::setFatalError(PassRefPtr&lt;PositionError&gt; error)
+{
+    // If a fatal error has already been set, stick with it. This makes sure that
+    // when permission is denied, this is the error reported, as required by the
+    // spec.
+    if (m_fatalError)
+        return;
+
+    m_fatalError = error;
+    // An existing timer may not have a zero timeout.
+    m_timer.stop();
+    m_timer.startOneShot(0);
+}
+
+void GeoNotifier::setUseCachedPosition()
+{
+    m_useCachedPosition = true;
+    m_timer.startOneShot(0);
+}
+
+bool GeoNotifier::hasZeroTimeout() const
+{
+    return m_options-&gt;hasTimeout() &amp;&amp; !m_options-&gt;timeout();
+}
+
+void GeoNotifier::runSuccessCallback(Geoposition* position)
+{
+    // If we are here and the Geolocation permission is not approved, something has
+    // gone horribly wrong.
+    if (!m_geolocation-&gt;isAllowed())
+        CRASH();
+
+    m_successCallback-&gt;handleEvent(position);
+}
+
+void GeoNotifier::runErrorCallback(PositionError* error)
+{
+    if (m_errorCallback)
+        m_errorCallback-&gt;handleEvent(error);
+}
+
+void GeoNotifier::startTimerIfNeeded()
+{
+    if (m_options-&gt;hasTimeout())
+        m_timer.startOneShot(m_options-&gt;timeout() / 1000.0);
+}
+
+void GeoNotifier::stopTimer()
+{
+    m_timer.stop();
+}
+
+void GeoNotifier::timerFired()
+{
+    m_timer.stop();
+
+    // Protect this GeoNotifier object, since it
+    // could be deleted by a call to clearWatch in a callback.
+    Ref&lt;GeoNotifier&gt; protect(*this);
+
+    // Test for fatal error first. This is required for the case where the Frame is
+    // disconnected and requests are cancelled.
+    if (m_fatalError) {
+        runErrorCallback(m_fatalError.get());
+        // This will cause this notifier to be deleted.
+        m_geolocation-&gt;fatalErrorOccurred(this);
+        return;
+    }
+
+    if (m_useCachedPosition) {
+        // Clear the cached position flag in case this is a watch request, which
+        // will continue to run.
+        m_useCachedPosition = false;
+        m_geolocation-&gt;requestUsesCachedPosition(this);
+        return;
+    }
+    
+    if (m_errorCallback) {
+        RefPtr&lt;PositionError&gt; error = PositionError::create(PositionError::TIMEOUT, ASCIILiteral(&quot;Timeout expired&quot;));
+        m_errorCallback-&gt;handleEvent(error.get());
+    }
+    m_geolocation-&gt;requestTimedOut(this);
+}
+
+} // namespace WebCore
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesgeolocationGeoNotifierh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/Modules/geolocation/GeoNotifier.h (0 => 180533)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/geolocation/GeoNotifier.h                                (rev 0)
+++ trunk/Source/WebCore/Modules/geolocation/GeoNotifier.h        2015-02-24 00:49:49 UTC (rev 180533)
</span><span class="lines">@@ -0,0 +1,79 @@
</span><ins>+/*
+ * Copyright (C) 2008-2011, 2015 Apple Inc. All Rights Reserved.
+ * Copyright 2010, The Android Open Source Project
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef GeoNotifier_h
+#define GeoNotifier_h
+
+#include &quot;Timer.h&quot;
+#include &lt;wtf/Forward.h&gt;
+#include &lt;wtf/RefCounted.h&gt;
+#include &lt;wtf/RefPtr.h&gt;
+
+namespace WebCore {
+
+class Geoposition;
+class Geolocation;
+class PositionCallback;
+class PositionError;
+class PositionErrorCallback;
+class PositionOptions;
+
+class GeoNotifier : public RefCounted&lt;GeoNotifier&gt; {
+public:
+    static Ref&lt;GeoNotifier&gt; create(Geolocation&amp; geolocation, PassRefPtr&lt;PositionCallback&gt; positionCallback, PassRefPtr&lt;PositionErrorCallback&gt; positionErrorCallback, PassRefPtr&lt;PositionOptions&gt; options)
+    {
+        return adoptRef(*new GeoNotifier(geolocation, positionCallback, positionErrorCallback, options));
+    }
+
+    PositionOptions* options() const { return m_options.get(); }
+    void setFatalError(PassRefPtr&lt;PositionError&gt;);
+
+    bool useCachedPosition() const { return m_useCachedPosition; }
+    void setUseCachedPosition();
+
+    void runSuccessCallback(Geoposition*);
+    void runErrorCallback(PositionError*);
+
+    void startTimerIfNeeded();
+    void stopTimer();
+    void timerFired();
+    bool hasZeroTimeout() const;
+
+private:
+    GeoNotifier(Geolocation&amp;, PassRefPtr&lt;PositionCallback&gt;, PassRefPtr&lt;PositionErrorCallback&gt;, PassRefPtr&lt;PositionOptions&gt;);
+
+    Ref&lt;Geolocation&gt; m_geolocation;
+    RefPtr&lt;PositionCallback&gt; m_successCallback;
+    RefPtr&lt;PositionErrorCallback&gt; m_errorCallback;
+    RefPtr&lt;PositionOptions&gt; m_options;
+    Timer m_timer;
+    RefPtr&lt;PositionError&gt; m_fatalError;
+    bool m_useCachedPosition;
+};
+
+} // namespace WebCore
+
+#endif // GeoNotifier_h
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesgeolocationGeolocationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/geolocation/Geolocation.cpp (180532 => 180533)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/geolocation/Geolocation.cpp        2015-02-24 00:24:48 UTC (rev 180532)
+++ trunk/Source/WebCore/Modules/geolocation/Geolocation.cpp        2015-02-24 00:49:49 UTC (rev 180533)
</span><span class="lines">@@ -30,19 +30,19 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(GEOLOCATION)
</span><span class="cx"> 
</span><ins>+#include &quot;Coordinates.h&quot;
</ins><span class="cx"> #include &quot;Document.h&quot;
</span><span class="cx"> #include &quot;Frame.h&quot;
</span><ins>+#include &quot;GeoNotifier.h&quot;
+#include &quot;GeolocationController.h&quot;
+#include &quot;GeolocationError.h&quot;
+#include &quot;GeolocationPosition.h&quot;
</ins><span class="cx"> #include &quot;Geoposition.h&quot;
</span><span class="cx"> #include &quot;Page.h&quot;
</span><ins>+#include &quot;PositionError.h&quot;
</ins><span class="cx"> #include &lt;wtf/CurrentTime.h&gt;
</span><span class="cx"> #include &lt;wtf/Ref.h&gt;
</span><span class="cx"> 
</span><del>-#include &quot;Coordinates.h&quot;
-#include &quot;GeolocationController.h&quot;
-#include &quot;GeolocationError.h&quot;
-#include &quot;GeolocationPosition.h&quot;
-#include &quot;PositionError.h&quot;
-
</del><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> static const char permissionDeniedErrorMessage[] = &quot;User denied Geolocation&quot;;
</span><span class="lines">@@ -75,105 +75,6 @@
</span><span class="cx">     return PositionError::create(code, error-&gt;message());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-Geolocation::GeoNotifier::GeoNotifier(Geolocation* geolocation, PassRefPtr&lt;PositionCallback&gt; successCallback, PassRefPtr&lt;PositionErrorCallback&gt; errorCallback, PassRefPtr&lt;PositionOptions&gt; options)
-    : m_geolocation(geolocation)
-    , m_successCallback(successCallback)
-    , m_errorCallback(errorCallback)
-    , m_options(options)
-    , m_timer(*this, &amp;Geolocation::GeoNotifier::timerFired)
-    , m_useCachedPosition(false)
-{
-    ASSERT(m_geolocation);
-    ASSERT(m_successCallback);
-    // If no options were supplied from JS, we should have created a default set
-    // of options in JSGeolocationCustom.cpp.
-    ASSERT(m_options);
-}
-
-void Geolocation::GeoNotifier::setFatalError(PassRefPtr&lt;PositionError&gt; error)
-{
-    // If a fatal error has already been set, stick with it. This makes sure that
-    // when permission is denied, this is the error reported, as required by the
-    // spec.
-    if (m_fatalError)
-        return;
-
-    m_fatalError = error;
-    // An existing timer may not have a zero timeout.
-    m_timer.stop();
-    m_timer.startOneShot(0);
-}
-
-void Geolocation::GeoNotifier::setUseCachedPosition()
-{
-    m_useCachedPosition = true;
-    m_timer.startOneShot(0);
-}
-
-bool Geolocation::GeoNotifier::hasZeroTimeout() const
-{
-    return m_options-&gt;hasTimeout() &amp;&amp; m_options-&gt;timeout() == 0;
-}
-
-void Geolocation::GeoNotifier::runSuccessCallback(Geoposition* position)
-{
-    // If we are here and the Geolocation permission is not approved, something has
-    // gone horribly wrong.
-    if (!m_geolocation-&gt;isAllowed())
-        CRASH();
-
-    m_successCallback-&gt;handleEvent(position);
-}
-
-void Geolocation::GeoNotifier::runErrorCallback(PositionError* error)
-{
-    if (m_errorCallback)
-        m_errorCallback-&gt;handleEvent(error);
-}
-
-void Geolocation::GeoNotifier::startTimerIfNeeded()
-{
-    if (m_options-&gt;hasTimeout())
-        m_timer.startOneShot(m_options-&gt;timeout() / 1000.0);
-}
-
-void Geolocation::GeoNotifier::stopTimer()
-{
-    m_timer.stop();
-}
-
-void Geolocation::GeoNotifier::timerFired()
-{
-    m_timer.stop();
-
-    // Protect this GeoNotifier object, since it
-    // could be deleted by a call to clearWatch in a callback.
-    Ref&lt;GeoNotifier&gt; protect(*this);
-
-    // Test for fatal error first. This is required for the case where the Frame is
-    // disconnected and requests are cancelled.
-    if (m_fatalError) {
-        runErrorCallback(m_fatalError.get());
-        // This will cause this notifier to be deleted.
-        m_geolocation-&gt;fatalErrorOccurred(this);
-        return;
-    }
-
-    if (m_useCachedPosition) {
-        // Clear the cached position flag in case this is a watch request, which
-        // will continue to run.
-        m_useCachedPosition = false;
-        m_geolocation-&gt;requestUsesCachedPosition(this);
-        return;
-    }
-
-    if (m_errorCallback) {
-        RefPtr&lt;PositionError&gt; error = PositionError::create(PositionError::TIMEOUT, ASCIILiteral(&quot;Timeout expired&quot;));
-        m_errorCallback-&gt;handleEvent(error.get());
-    }
-    m_geolocation-&gt;requestTimedOut(this);
-}
-
</del><span class="cx"> bool Geolocation::Watchers::add(int id, PassRefPtr&lt;GeoNotifier&gt; prpNotifier)
</span><span class="cx"> {
</span><span class="cx">     ASSERT(id &gt; 0);
</span><span class="lines">@@ -185,7 +86,7 @@
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-Geolocation::GeoNotifier* Geolocation::Watchers::find(int id)
</del><ins>+GeoNotifier* Geolocation::Watchers::find(int id)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(id &gt; 0);
</span><span class="cx">     return m_idToNotifierMap.get(id);
</span><span class="lines">@@ -408,7 +309,7 @@
</span><span class="cx">     if (!frame())
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    RefPtr&lt;GeoNotifier&gt; notifier = GeoNotifier::create(this, successCallback, errorCallback, options);
</del><ins>+    RefPtr&lt;GeoNotifier&gt; notifier = GeoNotifier::create(*this, successCallback, errorCallback, options);
</ins><span class="cx">     startRequest(notifier.get());
</span><span class="cx"> 
</span><span class="cx">     m_oneShots.add(notifier);
</span><span class="lines">@@ -419,7 +320,7 @@
</span><span class="cx">     if (!frame())
</span><span class="cx">         return 0;
</span><span class="cx"> 
</span><del>-    RefPtr&lt;GeoNotifier&gt; notifier = GeoNotifier::create(this, successCallback, errorCallback, options);
</del><ins>+    RefPtr&lt;GeoNotifier&gt; notifier = GeoNotifier::create(*this, successCallback, errorCallback, options);
</ins><span class="cx">     startRequest(notifier.get());
</span><span class="cx"> 
</span><span class="cx">     int watchID;
</span><span class="lines">@@ -450,7 +351,7 @@
</span><span class="cx">         notifier-&gt;setFatalError(PositionError::create(PositionError::POSITION_UNAVAILABLE, ASCIILiteral(failedToStartServiceErrorMessage)));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void Geolocation::fatalErrorOccurred(Geolocation::GeoNotifier* notifier)
</del><ins>+void Geolocation::fatalErrorOccurred(GeoNotifier* notifier)
</ins><span class="cx"> {
</span><span class="cx">     // This request has failed fatally. Remove it from our lists.
</span><span class="cx">     m_oneShots.remove(notifier);
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesgeolocationGeolocationh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/geolocation/Geolocation.h (180532 => 180533)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/geolocation/Geolocation.h        2015-02-24 00:24:48 UTC (rev 180532)
+++ trunk/Source/WebCore/Modules/geolocation/Geolocation.h        2015-02-24 00:49:49 UTC (rev 180533)
</span><span class="lines">@@ -42,6 +42,7 @@
</span><span class="cx"> 
</span><span class="cx"> class Document;
</span><span class="cx"> class Frame;
</span><ins>+class GeoNotifier;
</ins><span class="cx"> class GeolocationController;
</span><span class="cx"> class GeolocationError;
</span><span class="cx"> class GeolocationPosition;
</span><span class="lines">@@ -50,6 +51,8 @@
</span><span class="cx"> 
</span><span class="cx"> class Geolocation : public ScriptWrappable, public RefCounted&lt;Geolocation&gt;, public ActiveDOMObject
</span><span class="cx"> {
</span><ins>+friend class GeoNotifier;
+
</ins><span class="cx"> public:
</span><span class="cx">     static Ref&lt;Geolocation&gt; create(ScriptExecutionContext*);
</span><span class="cx">     WEBCORE_EXPORT ~Geolocation();
</span><span class="lines">@@ -83,36 +86,6 @@
</span><span class="cx"> 
</span><span class="cx">     Page* page() const;
</span><span class="cx"> 
</span><del>-    class GeoNotifier : public RefCounted&lt;GeoNotifier&gt; {
-    public:
-        static Ref&lt;GeoNotifier&gt; create(Geolocation* geolocation, PassRefPtr&lt;PositionCallback&gt; positionCallback, PassRefPtr&lt;PositionErrorCallback&gt; positionErrorCallback, PassRefPtr&lt;PositionOptions&gt; options) { return adoptRef(*new GeoNotifier(geolocation, positionCallback, positionErrorCallback, options)); }
-
-        PositionOptions* options() const { return m_options.get(); };
-        void setFatalError(PassRefPtr&lt;PositionError&gt;);
-
-        bool useCachedPosition() const { return m_useCachedPosition; }
-        void setUseCachedPosition();
-
-        void runSuccessCallback(Geoposition*);
-        void runErrorCallback(PositionError*);
-
-        void startTimerIfNeeded();
-        void stopTimer();
-        void timerFired();
-        bool hasZeroTimeout() const;
-
-    private:
-        GeoNotifier(Geolocation*, PassRefPtr&lt;PositionCallback&gt;, PassRefPtr&lt;PositionErrorCallback&gt;, PassRefPtr&lt;PositionOptions&gt;);
-
-        RefPtr&lt;Geolocation&gt; m_geolocation;
-        RefPtr&lt;PositionCallback&gt; m_successCallback;
-        RefPtr&lt;PositionErrorCallback&gt; m_errorCallback;
-        RefPtr&lt;PositionOptions&gt; m_options;
-        Timer m_timer;
-        RefPtr&lt;PositionError&gt; m_fatalError;
-        bool m_useCachedPosition;
-    };
-
</del><span class="cx">     typedef Vector&lt;RefPtr&lt;GeoNotifier&gt;&gt; GeoNotifierVector;
</span><span class="cx">     typedef HashSet&lt;RefPtr&lt;GeoNotifier&gt;&gt; GeoNotifierSet;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorevcxprojWebCorevcxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj (180532 => 180533)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj        2015-02-24 00:24:48 UTC (rev 180532)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj        2015-02-24 00:49:49 UTC (rev 180533)
</span><span class="lines">@@ -6805,6 +6805,7 @@
</span><span class="cx">     &lt;ClCompile Include=&quot;..\Modules\gamepad\GamepadEvent.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\Modules\gamepad\NavigatorGamepad.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\Modules\geolocation\Coordinates.cpp&quot; /&gt;
</span><ins>+    &lt;ClCompile Include=&quot;..\Modules\geolocation\GeoNotifier.cpp&quot; /&gt;
</ins><span class="cx">     &lt;ClCompile Include=&quot;..\Modules\geolocation\Geolocation.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\Modules\geolocation\GeolocationController.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\Modules\geolocation\NavigatorGeolocation.cpp&quot; /&gt;
</span><span class="lines">@@ -21581,4 +21582,4 @@
</span><span class="cx">   &lt;ImportGroup Label=&quot;ExtensionTargets&quot;&gt;
</span><span class="cx">     &lt;Import Project=&quot;$(VCTargetsPath)\BuildCustomizations\masm.targets&quot; /&gt;
</span><span class="cx">   &lt;/ImportGroup&gt;
</span><del>-&lt;/Project&gt;
</del><span class="cx">\ No newline at end of file
</span><ins>+&lt;/Project&gt;
</ins></span></pre></div>
<a id="trunkSourceWebCoreWebCorevcxprojWebCorevcxprojfilters"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters (180532 => 180533)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters        2015-02-24 00:24:48 UTC (rev 180532)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters        2015-02-24 00:49:49 UTC (rev 180533)
</span><span class="lines">@@ -384,6 +384,9 @@
</span><span class="cx">     &lt;ClCompile Include=&quot;..\Modules\geolocation\Geolocation.cpp&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;Modules\geolocation&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><ins>+    &lt;ClCompile Include=&quot;..\Modules\geolocation\GeoNotifier.cpp&quot;&gt;
+      &lt;Filter&gt;Modules\geolocation&lt;/Filter&gt;
+    &lt;/ClCompile&gt;
</ins><span class="cx">     &lt;ClCompile Include=&quot;..\Modules\geolocation\GeolocationController.cpp&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;Modules\geolocation&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><span class="lines">@@ -15377,4 +15380,4 @@
</span><span class="cx">       &lt;Filter&gt;platform\win&lt;/Filter&gt;
</span><span class="cx">     &lt;/MASM&gt;
</span><span class="cx">   &lt;/ItemGroup&gt;
</span><del>-&lt;/Project&gt;
</del><span class="cx">\ No newline at end of file
</span><ins>+&lt;/Project&gt;
</ins></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (180532 => 180533)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2015-02-24 00:24:48 UTC (rev 180532)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2015-02-24 00:49:49 UTC (rev 180533)
</span><span class="lines">@@ -1639,6 +1639,8 @@
</span><span class="cx">                 45FEA5CF156DDE8C00654101 /* Decimal.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 45FEA5CD156DDE8C00654101 /* Decimal.cpp */; };
</span><span class="cx">                 45FEA5D0156DDE8C00654101 /* Decimal.h in Headers */ = {isa = PBXBuildFile; fileRef = 45FEA5CE156DDE8C00654101 /* Decimal.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 4689F1AF1267BAE100E8D380 /* FileMetadata.h in Headers */ = {isa = PBXBuildFile; fileRef = 4689F1AE1267BAE100E8D380 /* FileMetadata.h */; };
</span><ins>+                46C83EFD1A9BBE2900A79A41 /* GeoNotifier.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46C83EFB1A9BBE2900A79A41 /* GeoNotifier.cpp */; };
+                46C83EFE1A9BBE2900A79A41 /* GeoNotifier.h in Headers */ = {isa = PBXBuildFile; fileRef = 46C83EFC1A9BBE2900A79A41 /* GeoNotifier.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">                 46FCB6181A70820E00C5A21E /* DiagnosticLoggingKeys.h in Headers */ = {isa = PBXBuildFile; fileRef = CD37B37515C1A7E1006DC898 /* DiagnosticLoggingKeys.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 490707E61219C04300D90E51 /* ANGLEWebKitBridge.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 490707E41219C04300D90E51 /* ANGLEWebKitBridge.cpp */; };
</span><span class="cx">                 490707E71219C04300D90E51 /* ANGLEWebKitBridge.h in Headers */ = {isa = PBXBuildFile; fileRef = 490707E51219C04300D90E51 /* ANGLEWebKitBridge.h */; };
</span><span class="lines">@@ -8722,6 +8724,8 @@
</span><span class="cx">                 45FEA5CD156DDE8C00654101 /* Decimal.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Decimal.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 45FEA5CE156DDE8C00654101 /* Decimal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Decimal.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 4689F1AE1267BAE100E8D380 /* FileMetadata.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FileMetadata.h; path = platform/FileMetadata.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                46C83EFB1A9BBE2900A79A41 /* GeoNotifier.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GeoNotifier.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                46C83EFC1A9BBE2900A79A41 /* GeoNotifier.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GeoNotifier.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 490707E41219C04300D90E51 /* ANGLEWebKitBridge.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ANGLEWebKitBridge.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 490707E51219C04300D90E51 /* ANGLEWebKitBridge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ANGLEWebKitBridge.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 49291E4A134172C800E753DE /* ImageRenderingMode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageRenderingMode.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -18145,6 +18149,8 @@
</span><span class="cx">                                 9746AF1114F4DDE6003E7A72 /* Coordinates.cpp */,
</span><span class="cx">                                 9746AF1114F4DDE6003E7A70 /* Coordinates.h */,
</span><span class="cx">                                 9746AF1214F4DDE6003E7A70 /* Coordinates.idl */,
</span><ins>+                                46C83EFB1A9BBE2900A79A41 /* GeoNotifier.cpp */,
+                                46C83EFC1A9BBE2900A79A41 /* GeoNotifier.h */,
</ins><span class="cx">                                 9746AF1314F4DDE6003E7A70 /* Geolocation.cpp */,
</span><span class="cx">                                 9746AF1414F4DDE6003E7A70 /* Geolocation.h */,
</span><span class="cx">                                 9746AF1514F4DDE6003E7A70 /* Geolocation.idl */,
</span><span class="lines">@@ -24745,6 +24751,7 @@
</span><span class="cx">                                 B885E8D511E06DD2009FFBF4 /* InspectorApplicationCacheAgent.h in Headers */,
</span><span class="cx">                                 1C81B95C0E97330800266E07 /* InspectorClient.h in Headers */,
</span><span class="cx">                                 F3F5CF1112ED81A80084C569 /* InspectorConsoleInstrumentation.h in Headers */,
</span><ins>+                                46C83EFE1A9BBE2900A79A41 /* GeoNotifier.h in Headers */,
</ins><span class="cx">                                 1C81B95A0E97330800266E07 /* InspectorController.h in Headers */,
</span><span class="cx">                                 82AB1744124B99EC00C5069D /* InspectorCSSAgent.h in Headers */,
</span><span class="cx">                                 4A9CC82116BF9BB400EC645A /* InspectorCSSOMWrappers.h in Headers */,
</span><span class="lines">@@ -29069,6 +29076,7 @@
</span><span class="cx">                                 85031B470A44EFC700F992E0 /* MouseRelatedEvent.cpp in Sources */,
</span><span class="cx">                                 93309DFB099E64920056E581 /* MoveSelectionCommand.cpp in Sources */,
</span><span class="cx">                                 FDB1700514A2BAB200A2B5D9 /* MultiChannelResampler.cpp in Sources */,
</span><ins>+                                46C83EFD1A9BBE2900A79A41 /* GeoNotifier.cpp in Sources */,
</ins><span class="cx">                                 85031B490A44EFC700F992E0 /* MutationEvent.cpp in Sources */,
</span><span class="cx">                                 C6F0900E14327B6100685849 /* MutationObserver.cpp in Sources */,
</span><span class="cx">                                 D6E528A3149A926D00EFE1F3 /* MutationObserverInterestGroup.cpp in Sources */,
</span></span></pre>
</div>
</div>

</body>
</html>