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

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

Issue 2704303002: Simplify conditionals for blink::Location::isActive(). (Closed)
Patch Set: Delete redundant check Created 3 years, 10 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/Location.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 124
125 DECLARE_VIRTUAL_TRACE(); 125 DECLARE_VIRTUAL_TRACE();
126 126
127 private: 127 private:
128 explicit Location(DOMWindow*); 128 explicit Location(DOMWindow*);
129 129
130 // Note: it is only valid to call this if this is a Location object for a 130 // Note: it is only valid to call this if this is a Location object for a
131 // LocalDOMWindow. 131 // LocalDOMWindow.
132 Document* document() const; 132 Document* document() const;
133 133
134 // Returns true if: 134 // Returns true if the associated Window is the active Window in the frame.
135 // (1) the associated Window is the active Window in the frame
136 // (2) and the frame is attached.
137 bool isAttached() const; 135 bool isAttached() const;
138 136
139 enum class SetLocationPolicy { Normal, ReplaceThisFrame }; 137 enum class SetLocationPolicy { Normal, ReplaceThisFrame };
140 void setLocation(const String&, 138 void setLocation(const String&,
141 LocalDOMWindow* currentWindow, 139 LocalDOMWindow* currentWindow,
142 LocalDOMWindow* enteredWindow, 140 LocalDOMWindow* enteredWindow,
143 ExceptionState* = nullptr, 141 ExceptionState* = nullptr,
144 SetLocationPolicy = SetLocationPolicy::Normal); 142 SetLocationPolicy = SetLocationPolicy::Normal);
145 143
146 const KURL& url() const; 144 const KURL& url() const;
147 145
148 const Member<DOMWindow> m_domWindow; 146 const Member<DOMWindow> m_domWindow;
149 }; 147 };
150 148
151 } // namespace blink 149 } // namespace blink
152 150
153 #endif // Location_h 151 #endif // Location_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/Location.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698