<!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>[55888] trunk</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/55888">55888</a></dd>
<dt>Author</dt> <dd>eric@webkit.org</dd>
<dt>Date</dt> <dd>2010-03-11 22:11:58 -0800 (Thu, 11 Mar 2010)</dd>
</dl>

<h3>Log Message</h3>
<pre>2010-03-11  Aaron Boodman  &lt;aa@chromium.org&gt;

        Kill WebDocument::applicationID() (part 1).

        Modify interface to WebCore::NotificationPresenter::checkPermission()
        and remove implementation of WebDocument::applicationID(). Breaking
        API changes will be in a subsequent change.
        https://bugs.webkit.org/show_bug.cgi?id=35846

        * notifications/Notification.cpp:
        (WebCore::Notification::Notification):
        * notifications/NotificationCenter.cpp:
        (WebCore::NotificationCenter::checkPermission):
        * notifications/NotificationPresenter.h:
2010-03-11  Aaron Boodman  &lt;aa@chromium.org&gt;

        Kill WebDocument::applicationID() (part 1).

        Modify interface to WebCore::NotificationPresenter::checkPermission()
        and remove implementation of WebDocument::applicationID(). Breaking
        API changes will be in a subsequent change.
        https://bugs.webkit.org/show_bug.cgi?id=35846

        * public/WebNotificationPresenter.h:
        * src/NotificationPresenterImpl.cpp:
        (WebKit::NotificationPresenterImpl::checkPermission):
        * src/NotificationPresenterImpl.h:
        * src/WebDocument.cpp:
        (WebKit::WebDocument::applicationID):
2010-03-11  Aaron Boodman  &lt;aa@chromium.org&gt;

        Kill WebDocument::applicationID() (part 1).

        Modify interface to WebCore::NotificationPresenter::checkPermission()
        and remove implementation of WebDocument::applicationID(). Breaking
        API changes will be in a subsequent change.
        https://bugs.webkit.org/show_bug.cgi?id=35846

        * WebCoreSupport/WebDesktopNotificationsDelegate.cpp:
        (WebDesktopNotificationsDelegate::checkPermission):
        * WebCoreSupport/WebDesktopNotificationsDelegate.h:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkWebCoreChangeLog">trunk/WebCore/ChangeLog</a></li>
<li><a href="#trunkWebCorenotificationsNotificationcpp">trunk/WebCore/notifications/Notification.cpp</a></li>
<li><a href="#trunkWebCorenotificationsNotificationCentercpp">trunk/WebCore/notifications/NotificationCenter.cpp</a></li>
<li><a href="#trunkWebCorenotificationsNotificationPresenterh">trunk/WebCore/notifications/NotificationPresenter.h</a></li>
<li><a href="#trunkWebKitchromiumChangeLog">trunk/WebKit/chromium/ChangeLog</a></li>
<li><a href="#trunkWebKitchromiumpublicWebNotificationPresenterh">trunk/WebKit/chromium/public/WebNotificationPresenter.h</a></li>
<li><a href="#trunkWebKitchromiumsrcNotificationPresenterImplcpp">trunk/WebKit/chromium/src/NotificationPresenterImpl.cpp</a></li>
<li><a href="#trunkWebKitchromiumsrcNotificationPresenterImplh">trunk/WebKit/chromium/src/NotificationPresenterImpl.h</a></li>
<li><a href="#trunkWebKitchromiumsrcWebDocumentcpp">trunk/WebKit/chromium/src/WebDocument.cpp</a></li>
<li><a href="#trunkWebKitwinChangeLog">trunk/WebKit/win/ChangeLog</a></li>
<li><a href="#trunkWebKitwinWebCoreSupportWebDesktopNotificationsDelegatecpp">trunk/WebKit/win/WebCoreSupport/WebDesktopNotificationsDelegate.cpp</a></li>
<li><a href="#trunkWebKitwinWebCoreSupportWebDesktopNotificationsDelegateh">trunk/WebKit/win/WebCoreSupport/WebDesktopNotificationsDelegate.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/ChangeLog (55887 => 55888)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/ChangeLog        2010-03-12 05:41:43 UTC (rev 55887)
+++ trunk/WebCore/ChangeLog        2010-03-12 06:11:58 UTC (rev 55888)
</span><span class="lines">@@ -1,3 +1,18 @@
</span><ins>+2010-03-11  Aaron Boodman  &lt;aa@chromium.org&gt;
+
+        Kill WebDocument::applicationID() (part 1).
+
+        Modify interface to WebCore::NotificationPresenter::checkPermission()
+        and remove implementation of WebDocument::applicationID(). Breaking
+        API changes will be in a subsequent change.
+        https://bugs.webkit.org/show_bug.cgi?id=35846
+
+        * notifications/Notification.cpp:
+        (WebCore::Notification::Notification):
+        * notifications/NotificationCenter.cpp:
+        (WebCore::NotificationCenter::checkPermission):
+        * notifications/NotificationPresenter.h:
+
</ins><span class="cx"> 2010-03-11  Dmitry Titov  &lt;dimich@chromium.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Reviewed by David Levin.
</span></span></pre></div>
<a id="trunkWebCorenotificationsNotificationcpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/notifications/Notification.cpp (55887 => 55888)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/notifications/Notification.cpp        2010-03-12 05:41:43 UTC (rev 55887)
+++ trunk/WebCore/notifications/Notification.cpp        2010-03-12 06:11:58 UTC (rev 55888)
</span><span class="lines">@@ -49,8 +49,7 @@
</span><span class="cx">     , m_presenter(provider)
</span><span class="cx"> {
</span><span class="cx">     ASSERT(m_presenter);
</span><del>-    Document* document = context-&gt;isDocument() ? static_cast&lt;Document*&gt;(context) : 0;
-    if (m_presenter-&gt;checkPermission(context-&gt;url(), document) != NotificationPresenter::PermissionAllowed) {
</del><ins>+    if (m_presenter-&gt;checkPermission(context-&gt;securityOrigin()) != NotificationPresenter::PermissionAllowed) {
</ins><span class="cx">         ec = SECURITY_ERR;
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="lines">@@ -70,8 +69,7 @@
</span><span class="cx">     , m_presenter(provider)
</span><span class="cx"> {
</span><span class="cx">     ASSERT(m_presenter);
</span><del>-    Document* document = context-&gt;isDocument() ? static_cast&lt;Document*&gt;(context) : 0;
-    if (m_presenter-&gt;checkPermission(context-&gt;url(), document) != NotificationPresenter::PermissionAllowed) {
</del><ins>+    if (m_presenter-&gt;checkPermission(context-&gt;securityOrigin()) != NotificationPresenter::PermissionAllowed) {
</ins><span class="cx">         ec = SECURITY_ERR;
</span><span class="cx">         return;
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkWebCorenotificationsNotificationCentercpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/notifications/NotificationCenter.cpp (55887 => 55888)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/notifications/NotificationCenter.cpp        2010-03-12 05:41:43 UTC (rev 55887)
+++ trunk/WebCore/notifications/NotificationCenter.cpp        2010-03-12 06:11:58 UTC (rev 55888)
</span><span class="lines">@@ -49,9 +49,7 @@
</span><span class="cx"> {
</span><span class="cx">     if (!presenter())
</span><span class="cx">         return NotificationPresenter::PermissionDenied;
</span><del>-    return m_notificationPresenter-&gt;checkPermission(
-        m_scriptExecutionContext-&gt;url(),
-        m_scriptExecutionContext-&gt;isDocument() ? static_cast&lt;Document*&gt;(m_scriptExecutionContext) : 0);
</del><ins>+    return m_notificationPresenter-&gt;checkPermission(m_scriptExecutionContext-&gt;securityOrigin());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void NotificationCenter::requestPermission(PassRefPtr&lt;VoidCallback&gt; callback)
</span></span></pre></div>
<a id="trunkWebCorenotificationsNotificationPresenterh"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/notifications/NotificationPresenter.h (55887 => 55888)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/notifications/NotificationPresenter.h        2010-03-12 05:41:43 UTC (rev 55887)
+++ trunk/WebCore/notifications/NotificationPresenter.h        2010-03-12 06:11:58 UTC (rev 55888)
</span><span class="lines">@@ -71,10 +71,8 @@
</span><span class="cx">         // made a decision.
</span><span class="cx">         virtual void requestPermission(SecurityOrigin*, PassRefPtr&lt;VoidCallback&gt;) = 0;
</span><span class="cx"> 
</span><del>-        // Checks the current level of permission for the specified URL. If the
-        // URL is a document (as opposed to a worker or other ScriptExecutionContext),
-        // |document| will also be provided.
-        virtual Permission checkPermission(const KURL&amp;, Document*) = 0;
</del><ins>+        // Checks the current level of permission.
+        virtual Permission checkPermission(SecurityOrigin*) = 0;
</ins><span class="cx">     };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkWebKitchromiumChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/WebKit/chromium/ChangeLog (55887 => 55888)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKit/chromium/ChangeLog        2010-03-12 05:41:43 UTC (rev 55887)
+++ trunk/WebKit/chromium/ChangeLog        2010-03-12 06:11:58 UTC (rev 55888)
</span><span class="lines">@@ -1,3 +1,19 @@
</span><ins>+2010-03-11  Aaron Boodman  &lt;aa@chromium.org&gt;
+
+        Kill WebDocument::applicationID() (part 1).
+
+        Modify interface to WebCore::NotificationPresenter::checkPermission()
+        and remove implementation of WebDocument::applicationID(). Breaking
+        API changes will be in a subsequent change.
+        https://bugs.webkit.org/show_bug.cgi?id=35846
+
+        * public/WebNotificationPresenter.h:
+        * src/NotificationPresenterImpl.cpp:
+        (WebKit::NotificationPresenterImpl::checkPermission):
+        * src/NotificationPresenterImpl.h:
+        * src/WebDocument.cpp:
+        (WebKit::WebDocument::applicationID):
+
</ins><span class="cx"> 2010-03-11  Stuart Morgan  &lt;stuartmorgan@chromium.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Reviewed by Darin Fisher.
</span></span></pre></div>
<a id="trunkWebKitchromiumpublicWebNotificationPresenterh"></a>
<div class="modfile"><h4>Modified: trunk/WebKit/chromium/public/WebNotificationPresenter.h (55887 => 55888)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKit/chromium/public/WebNotificationPresenter.h        2010-03-12 05:41:43 UTC (rev 55887)
+++ trunk/WebKit/chromium/public/WebNotificationPresenter.h        2010-03-12 06:11:58 UTC (rev 55888)
</span><span class="lines">@@ -31,13 +31,14 @@
</span><span class="cx"> #ifndef WebNotificationPresenter_h
</span><span class="cx"> #define WebNotificationPresenter_h
</span><span class="cx"> 
</span><ins>+#include &quot;WebNotificationPermissionCallback.h&quot;
+#include &quot;WebSecurityOrigin.h&quot;
</ins><span class="cx"> #include &quot;WebString.h&quot;
</span><span class="cx"> 
</span><span class="cx"> namespace WebKit {
</span><span class="cx"> 
</span><span class="cx"> class WebDocument;
</span><span class="cx"> class WebNotification;
</span><del>-class WebNotificationPermissionCallback;
</del><span class="cx"> class WebURL;
</span><span class="cx"> 
</span><span class="cx"> // Provides the services to show desktop notifications to the user.
</span><span class="lines">@@ -59,14 +60,35 @@
</span><span class="cx">     // being destroyed.  Does _not_ remove the notification if being shown, but detaches it from receiving events.
</span><span class="cx">     virtual void objectDestroyed(const WebNotification&amp;) = 0;
</span><span class="cx"> 
</span><ins>+    // Checks the permission level for the given origin.
+    // FIXME: This should become abstract when the below is removed.
+    virtual Permission checkPermission(const WebSecurityOrigin&amp; origin)
+    {
+        return PermissionNotAllowed;
+    };
+
</ins><span class="cx">     // Checks the permission level for the given URL. If the URL is being displayed in a document
</span><span class="cx">     // (as opposed to a worker or other ScriptExecutionContext), |document| will also be provided.
</span><del>-    virtual Permission checkPermission(const WebURL&amp; url, WebDocument* document) = 0;
</del><ins>+    // FIXME: This method should be removed as clients don't need WebDocument anymore.
+    virtual Permission checkPermission(const WebURL&amp; url, WebDocument* document)
+    {
+        return PermissionNotAllowed;
+    }
</ins><span class="cx"> 
</span><span class="cx">     // Requests permission for a given origin.  This operation is asynchronous and the callback provided
</span><span class="cx">     // will be invoked when the permission decision is made.  Callback pointer must remain
</span><span class="cx">     // valid until called.
</span><del>-    virtual void requestPermission(const WebString&amp; origin, WebNotificationPermissionCallback* callback) = 0;
</del><ins>+    // FIXME: This method should be removed when clients are moved to the below.
+    virtual void requestPermission(const WebString&amp; origin, WebNotificationPermissionCallback* callback)
+    {
+        callback-&gt;permissionRequestComplete();
+    }
+    
+    // FIXME: This method should be abstract when the above is removed.
+    virtual void requestPermission(const WebSecurityOrigin&amp; origin, WebNotificationPermissionCallback* callback)
+    {
+        callback-&gt;permissionRequestComplete();
+    }
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkWebKitchromiumsrcNotificationPresenterImplcpp"></a>
<div class="modfile"><h4>Modified: trunk/WebKit/chromium/src/NotificationPresenterImpl.cpp (55887 => 55888)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKit/chromium/src/NotificationPresenterImpl.cpp        2010-03-12 05:41:43 UTC (rev 55887)
+++ trunk/WebKit/chromium/src/NotificationPresenterImpl.cpp        2010-03-12 06:11:58 UTC (rev 55888)
</span><span class="lines">@@ -33,11 +33,10 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(NOTIFICATIONS)
</span><span class="cx"> 
</span><del>-#include &quot;Document.h&quot;
</del><ins>+#include &quot;KURL.h&quot;
</ins><span class="cx"> #include &quot;Notification.h&quot;
</span><span class="cx"> #include &quot;SecurityOrigin.h&quot;
</span><span class="cx"> 
</span><del>-#include &quot;WebDocument.h&quot;
</del><span class="cx"> #include &quot;WebNotification.h&quot;
</span><span class="cx"> #include &quot;WebNotificationPermissionCallback.h&quot;
</span><span class="cx"> #include &quot;WebNotificationPresenter.h&quot;
</span><span class="lines">@@ -92,19 +91,22 @@
</span><span class="cx">     m_presenter-&gt;objectDestroyed(PassRefPtr&lt;Notification&gt;(notification));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-NotificationPresenter::Permission NotificationPresenterImpl::checkPermission(const KURL&amp; url, Document* document)
</del><ins>+NotificationPresenter::Permission NotificationPresenterImpl::checkPermission(SecurityOrigin* origin)
</ins><span class="cx"> {
</span><del>-    WebDocument webDocument;
-    if (document)
-        webDocument = document;
</del><ins>+    int result = m_presenter-&gt;checkPermission(WebSecurityOrigin(origin));
</ins><span class="cx"> 
</span><del>-    int result = m_presenter-&gt;checkPermission(url, document ? &amp;webDocument : 0);
</del><ins>+    // FIXME: Remove this once clients are updated to use the above signature.
+    if (result == NotificationPresenter::PermissionNotAllowed)
+        result = m_presenter-&gt;checkPermission(KURL(KURL(), origin-&gt;toString()), 0);
+
</ins><span class="cx">     return static_cast&lt;NotificationPresenter::Permission&gt;(result);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void NotificationPresenterImpl::requestPermission(SecurityOrigin* origin, PassRefPtr&lt;VoidCallback&gt; callback)
</span><span class="cx"> {
</span><ins>+    // FIXME: Remove the first call once clients are updated to use the second signature.
</ins><span class="cx">     m_presenter-&gt;requestPermission(origin-&gt;toString(), new VoidCallbackClient(callback));
</span><ins>+    m_presenter-&gt;requestPermission(WebSecurityOrigin(origin), new VoidCallbackClient(callback));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkWebKitchromiumsrcNotificationPresenterImplh"></a>
<div class="modfile"><h4>Modified: trunk/WebKit/chromium/src/NotificationPresenterImpl.h (55887 => 55888)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKit/chromium/src/NotificationPresenterImpl.h        2010-03-12 05:41:43 UTC (rev 55887)
+++ trunk/WebKit/chromium/src/NotificationPresenterImpl.h        2010-03-12 06:11:58 UTC (rev 55888)
</span><span class="lines">@@ -54,7 +54,7 @@
</span><span class="cx">     virtual bool show(WebCore::Notification* object);
</span><span class="cx">     virtual void cancel(WebCore::Notification* object);
</span><span class="cx">     virtual void notificationObjectDestroyed(WebCore::Notification* object);
</span><del>-    virtual WebCore::NotificationPresenter::Permission checkPermission(const WebCore::KURL&amp; url, WebCore::Document* document);
</del><ins>+    virtual WebCore::NotificationPresenter::Permission checkPermission(WebCore::SecurityOrigin* origin);
</ins><span class="cx">     virtual void requestPermission(WebCore::SecurityOrigin* origin, WTF::PassRefPtr&lt;WebCore::VoidCallback&gt; callback);
</span><span class="cx"> 
</span><span class="cx"> private:
</span></span></pre></div>
<a id="trunkWebKitchromiumsrcWebDocumentcpp"></a>
<div class="modfile"><h4>Modified: trunk/WebKit/chromium/src/WebDocument.cpp (55887 => 55888)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKit/chromium/src/WebDocument.cpp        2010-03-12 05:41:43 UTC (rev 55887)
+++ trunk/WebKit/chromium/src/WebDocument.cpp        2010-03-12 06:11:58 UTC (rev 55888)
</span><span class="lines">@@ -32,7 +32,6 @@
</span><span class="cx"> #include &quot;WebDocument.h&quot;
</span><span class="cx"> 
</span><span class="cx"> #include &quot;Document.h&quot;
</span><del>-#include &quot;DocumentLoader.h&quot;
</del><span class="cx"> #include &quot;Element.h&quot;
</span><span class="cx"> #include &quot;HTMLAllCollection.h&quot;
</span><span class="cx"> #include &quot;HTMLBodyElement.h&quot;
</span><span class="lines">@@ -110,34 +109,6 @@
</span><span class="cx"> 
</span><span class="cx"> WebString WebDocument::applicationID() const
</span><span class="cx"> {
</span><del>-    const char* kChromeApplicationHeader = &quot;x-chrome-application&quot;;
-
-    // First check if the document's response included a header indicating the
-    // application it should go with.
-    const Document* document = constUnwrap&lt;Document&gt;();
-    Frame* frame = document-&gt;frame();
-    if (!frame)
-        return WebString();
-
-    DocumentLoader* loader = frame-&gt;loader()-&gt;documentLoader();
-    if (!loader)
-        return WebString();
-
-    WebString headerValue =
-        loader-&gt;response().httpHeaderField(kChromeApplicationHeader);
-    if (!headerValue.isEmpty())
-        return headerValue;
-
-    // Otherwise, fall back to looking for the meta tag.
-    RefPtr&lt;NodeList&gt; metaTags =
-        const_cast&lt;Document*&gt;(document)-&gt;getElementsByTagName(&quot;meta&quot;);
-    for (unsigned i = 0; i &lt; metaTags-&gt;length(); ++i) {
-        Element* element = static_cast&lt;Element*&gt;(metaTags-&gt;item(i));
-        if (element-&gt;hasAttribute(&quot;http-equiv&quot;)
-            &amp;&amp; element-&gt;getAttribute(&quot;http-equiv&quot;).lower() == kChromeApplicationHeader)
-            return element-&gt;getAttribute(&quot;value&quot;);
-    }
-
</del><span class="cx">     return WebString();
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkWebKitwinChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/WebKit/win/ChangeLog (55887 => 55888)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKit/win/ChangeLog        2010-03-12 05:41:43 UTC (rev 55887)
+++ trunk/WebKit/win/ChangeLog        2010-03-12 06:11:58 UTC (rev 55888)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2010-03-11  Aaron Boodman  &lt;aa@chromium.org&gt;
+
+        Kill WebDocument::applicationID() (part 1).
+
+        Modify interface to WebCore::NotificationPresenter::checkPermission()
+        and remove implementation of WebDocument::applicationID(). Breaking
+        API changes will be in a subsequent change.
+        https://bugs.webkit.org/show_bug.cgi?id=35846
+
+        * WebCoreSupport/WebDesktopNotificationsDelegate.cpp:
+        (WebDesktopNotificationsDelegate::checkPermission):
+        * WebCoreSupport/WebDesktopNotificationsDelegate.h:
+
</ins><span class="cx"> 2010-03-11  Anders Carlsson  &lt;andersca@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Reviewed by David Hyatt.
</span></span></pre></div>
<a id="trunkWebKitwinWebCoreSupportWebDesktopNotificationsDelegatecpp"></a>
<div class="modfile"><h4>Modified: trunk/WebKit/win/WebCoreSupport/WebDesktopNotificationsDelegate.cpp (55887 => 55888)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKit/win/WebCoreSupport/WebDesktopNotificationsDelegate.cpp        2010-03-12 05:41:43 UTC (rev 55887)
+++ trunk/WebKit/win/WebCoreSupport/WebDesktopNotificationsDelegate.cpp        2010-03-12 06:11:58 UTC (rev 55888)
</span><span class="lines">@@ -174,8 +174,13 @@
</span><span class="cx"> 
</span><span class="cx"> NotificationPresenter::Permission WebDesktopNotificationsDelegate::checkPermission(const KURL&amp; url, Document*)
</span><span class="cx"> {
</span><ins>+    return NotificationPresenter::PermissionNotAllowed;
+}
+
+NotificationPresenter::Permission WebDesktopNotificationsDelegate::checkPermission(SecurityOrigin* origin)
+{
</ins><span class="cx">     int out = 0;
</span><del>-    BString org(SecurityOrigin::create(url)-&gt;toString());
</del><ins>+    BString org(origin-&gt;toString());
</ins><span class="cx">     if (hasNotificationDelegate())
</span><span class="cx">         notificationDelegate()-&gt;checkNotificationPermission(org, &amp;out);
</span><span class="cx">     return (NotificationPresenter::Permission) out;
</span></span></pre></div>
<a id="trunkWebKitwinWebCoreSupportWebDesktopNotificationsDelegateh"></a>
<div class="modfile"><h4>Modified: trunk/WebKit/win/WebCoreSupport/WebDesktopNotificationsDelegate.h (55887 => 55888)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKit/win/WebCoreSupport/WebDesktopNotificationsDelegate.h        2010-03-12 05:41:43 UTC (rev 55887)
+++ trunk/WebKit/win/WebCoreSupport/WebDesktopNotificationsDelegate.h        2010-03-12 06:11:58 UTC (rev 55888)
</span><span class="lines">@@ -51,6 +51,7 @@
</span><span class="cx">     virtual void notificationObjectDestroyed(WebCore::Notification* object);
</span><span class="cx">     virtual void requestPermission(WebCore::SecurityOrigin* origin, PassRefPtr&lt;WebCore::VoidCallback&gt; callback);
</span><span class="cx">     virtual WebCore::NotificationPresenter::Permission checkPermission(const KURL&amp; url, Document* document);
</span><ins>+    virtual WebCore::NotificationPresenter::Permission checkPermission(const WebCore::SecurityOrigin* origin);
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     bool hasNotificationDelegate();
</span></span></pre>
</div>
</div>

</body>
</html>