diff options
author | dglazkov@google.com <dglazkov@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-22 15:46:42 +0000 |
---|---|---|
committer | dglazkov@google.com <dglazkov@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-22 15:46:42 +0000 |
commit | 67b716c5c6ecb04d8356fa43706cac4c5f534dd4 (patch) | |
tree | 9e074c700ae74a5a73b603df25d82b418462b52c /webkit/port | |
parent | b5a3d50b8df2574efd4d9c2251d4654e863bb18a (diff) | |
download | chromium_src-67b716c5c6ecb04d8356fa43706cac4c5f534dd4.zip chromium_src-67b716c5c6ecb04d8356fa43706cac4c5f534dd4.tar.gz chromium_src-67b716c5c6ecb04d8356fa43706cac4c5f534dd4.tar.bz2 |
Review URL: http://codereview.chromium.org/7848
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3732 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/port')
-rw-r--r-- | webkit/port/page/Location.cpp | 11 | ||||
-rw-r--r-- | webkit/port/page/Location.h | 64 |
2 files changed, 11 insertions, 64 deletions
diff --git a/webkit/port/page/Location.cpp b/webkit/port/page/Location.cpp index 9933287..6757b78 100644 --- a/webkit/port/page/Location.cpp +++ b/webkit/port/page/Location.cpp @@ -35,6 +35,7 @@ #include "FrameLoader.h" #include "ScriptController.h" #include "CSSHelper.h" +#include "Frame.h" namespace { @@ -75,6 +76,16 @@ namespace WebCore { // isSafeScript() #endif +Location::Location(Frame* frame) + : m_frame(frame) +{ +} + +void Location::disconnectFrame() +{ + m_frame = 0; +} + String Location::hash() const { if (!m_frame) return String(); diff --git a/webkit/port/page/Location.h b/webkit/port/page/Location.h deleted file mode 100644 index 66ce396..0000000 --- a/webkit/port/page/Location.h +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - - -#ifndef Location_h -#define Location_h - -#include <wtf/RefCounted.h> -#include "Frame.h" - -namespace WebCore { - -class Location : public RefCounted<Location> { - public: - static PassRefPtr<Location> create(Frame* frame) - { - return adoptRef(new Location(frame)); - } - - Frame* frame() { return m_frame; } - - String protocol() const; - String host() const; - String hostname() const; - String port() const; - String pathname() const; - String search() const; - String hash() const; - String href() const; - - String toString() const; - -#if USE(V8) - void setHash(const String& str); - void setHost(const String& str); - void setHostname(const String&); - void setHref(const String&); - void setPathname(const String&); - void setPort(const String&); - void setProtocol(const String&); - void setSearch(const String&); - - void reload(bool forceget); - void replace(const String& url); - void assign(const String& url); -#endif - - void disconnectFrame() { m_frame = 0; } - - private: - Location(Frame* frame) : m_frame(frame) { } - - Frame* m_frame; - -#if USE(V8) - friend class WindowV8; -#endif -}; - -} // namespace WebCore - -#endif // Location_h - |