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

Side by Side Diff: third_party/WebKit/Source/core/frame/Location.h

Issue 2706923002: Rework security checks to be based on Window rather than Frame. (Closed)
Patch Set: Address review comments. Created 3 years, 9 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2008, 2010 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 class CORE_EXPORT Location final : public GarbageCollected<Location>, 51 class CORE_EXPORT Location final : public GarbageCollected<Location>,
52 public ScriptWrappable { 52 public ScriptWrappable {
53 DEFINE_WRAPPERTYPEINFO(); 53 DEFINE_WRAPPERTYPEINFO();
54 54
55 public: 55 public:
56 static Location* create(DOMWindow* domWindow) { 56 static Location* create(DOMWindow* domWindow) {
57 return new Location(domWindow); 57 return new Location(domWindow);
58 } 58 }
59 59
60 DOMWindow* domWindow() const { return m_domWindow.get(); } 60 DOMWindow* domWindow() const { return m_domWindow.get(); }
61 // TODO(dcheng): Deprecated and will be removed. Do not use in new code!
62 Frame* frame() const { return m_domWindow->frame(); }
63 61
64 void setHref(LocalDOMWindow* currentWindow, 62 void setHref(LocalDOMWindow* currentWindow,
65 LocalDOMWindow* enteredWindow, 63 LocalDOMWindow* enteredWindow,
66 const String&, 64 const String&,
67 ExceptionState&); 65 ExceptionState&);
68 String href() const; 66 String href() const;
69 67
70 void assign(LocalDOMWindow* currentWindow, 68 void assign(LocalDOMWindow* currentWindow,
71 LocalDOMWindow* enteredWindow, 69 LocalDOMWindow* enteredWindow,
72 const String&, 70 const String&,
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 SetLocationPolicy = SetLocationPolicy::Normal); 140 SetLocationPolicy = SetLocationPolicy::Normal);
143 141
144 const KURL& url() const; 142 const KURL& url() const;
145 143
146 const Member<DOMWindow> m_domWindow; 144 const Member<DOMWindow> m_domWindow;
147 }; 145 };
148 146
149 } // namespace blink 147 } // namespace blink
150 148
151 #endif // Location_h 149 #endif // Location_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698