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

Unified Diff: webkit/api/src/WebSecurityOrigin.cpp

Issue 211013: Introduce WebKit::WebSecurityOrigin as a wrapper around... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 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 | « webkit/api/public/WebSecurityOrigin.h ('k') | webkit/glue/empty_webframeclient.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/api/src/WebSecurityOrigin.cpp
===================================================================
--- webkit/api/src/WebSecurityOrigin.cpp (revision 26416)
+++ webkit/api/src/WebSecurityOrigin.cpp (working copy)
@@ -29,53 +29,56 @@
*/
#include "config.h"
-#include "WebForm.h"
+#include "WebSecurityOrigin.h"
-#include "HTMLFormElement.h"
+#include "SecurityOrigin.h"
+#include "WebString.h"
#include <wtf/PassRefPtr.h>
using namespace WebCore;
namespace WebKit {
-class WebFormPrivate : public HTMLFormElement {
+class WebSecurityOriginPrivate : public SecurityOrigin {
};
-void WebForm::reset()
+void WebSecurityOrigin::reset()
{
assign(0);
}
-void WebForm::assign(const WebForm& other)
+void WebSecurityOrigin::assign(const WebSecurityOrigin& other)
{
- WebFormPrivate* p = const_cast<WebFormPrivate*>(other.m_private);
+ WebSecurityOriginPrivate* p = const_cast<WebSecurityOriginPrivate*>(other.m_private);
p->ref();
assign(p);
}
-bool WebForm::isAutoCompleteEnabled() const
+WebString WebSecurityOrigin::toString() const
{
- ASSERT(!isNull());
- return m_private->autoComplete();
+ if (m_private)
+ return m_private->toString();
+
+ return WebString::fromUTF8("null");
}
-WebForm::WebForm(const WTF::PassRefPtr<WebCore::HTMLFormElement>& element)
- : m_private(static_cast<WebFormPrivate*>(element.releaseRef()))
+WebSecurityOrigin::WebSecurityOrigin(const WTF::PassRefPtr<WebCore::SecurityOrigin>& origin)
+ : m_private(static_cast<WebSecurityOriginPrivate*>(origin.releaseRef()))
{
}
-WebForm& WebForm::operator=(const WTF::PassRefPtr<WebCore::HTMLFormElement>& element)
+WebSecurityOrigin& WebSecurityOrigin::operator=(const WTF::PassRefPtr<WebCore::SecurityOrigin>& origin)
{
- assign(static_cast<WebFormPrivate*>(element.releaseRef()));
+ assign(static_cast<WebSecurityOriginPrivate*>(origin.releaseRef()));
return *this;
}
-WebForm::operator WTF::PassRefPtr<WebCore::HTMLFormElement>() const
+WebSecurityOrigin::operator WTF::PassRefPtr<WebCore::SecurityOrigin>() const
{
- return PassRefPtr<HTMLFormElement>(const_cast<WebFormPrivate*>(m_private));
+ return PassRefPtr<SecurityOrigin>(const_cast<WebSecurityOriginPrivate*>(m_private));
}
-void WebForm::assign(WebFormPrivate* p)
+void WebSecurityOrigin::assign(WebSecurityOriginPrivate* p)
{
// p is already ref'd for us by the caller
if (m_private)
« no previous file with comments | « webkit/api/public/WebSecurityOrigin.h ('k') | webkit/glue/empty_webframeclient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698