| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "public/web/WebFrame.h" | 5 #include "public/web/WebFrame.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include "bindings/core/v8/WindowProxyManager.h" | 8 #include "bindings/core/v8/WindowProxyManager.h" |
| 9 #include "core/HTMLNames.h" | 9 #include "core/HTMLNames.h" |
| 10 #include "core/dom/IncrementLoadEventDelayCount.h" | 10 #include "core/dom/IncrementLoadEventDelayCount.h" |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 owner->SetScrollingMode(properties.scrolling_mode); | 174 owner->SetScrollingMode(properties.scrolling_mode); |
| 175 owner->SetMarginWidth(properties.margin_width); | 175 owner->SetMarginWidth(properties.margin_width); |
| 176 owner->SetMarginHeight(properties.margin_height); | 176 owner->SetMarginHeight(properties.margin_height); |
| 177 owner->SetAllowFullscreen(properties.allow_fullscreen); | 177 owner->SetAllowFullscreen(properties.allow_fullscreen); |
| 178 owner->SetAllowPaymentRequest(properties.allow_payment_request); | 178 owner->SetAllowPaymentRequest(properties.allow_payment_request); |
| 179 owner->SetIsDisplayNone(properties.is_display_none); | 179 owner->SetIsDisplayNone(properties.is_display_none); |
| 180 owner->SetCsp(properties.required_csp); | 180 owner->SetCsp(properties.required_csp); |
| 181 owner->SetAllowedFeatures(properties.allowed_features); | 181 owner->SetAllowedFeatures(properties.allowed_features); |
| 182 } | 182 } |
| 183 | 183 |
| 184 void WebFrame::Collapse(bool collapsed) { |
| 185 FrameOwner* owner = ToCoreFrame(*this)->Owner(); |
| 186 DCHECK(owner->IsLocal()); |
| 187 ToHTMLFrameOwnerElement(owner)->SetCollapsedByClient(collapsed); |
| 188 } |
| 189 |
| 184 WebFrame* WebFrame::Opener() const { | 190 WebFrame* WebFrame::Opener() const { |
| 185 return opener_; | 191 return opener_; |
| 186 } | 192 } |
| 187 | 193 |
| 188 void WebFrame::SetOpener(WebFrame* opener) { | 194 void WebFrame::SetOpener(WebFrame* opener) { |
| 189 if (opener_) | 195 if (opener_) |
| 190 opener_->opened_frame_tracker_->Remove(this); | 196 opener_->opened_frame_tracker_->Remove(this); |
| 191 if (opener) | 197 if (opener) |
| 192 opener->opened_frame_tracker_->Add(this); | 198 opener->opened_frame_tracker_->Add(this); |
| 193 opener_ = opener; | 199 opener_ = opener; |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 344 Frame* WebFrame::ToCoreFrame(const WebFrame& frame) { | 350 Frame* WebFrame::ToCoreFrame(const WebFrame& frame) { |
| 345 if (frame.IsWebLocalFrame()) | 351 if (frame.IsWebLocalFrame()) |
| 346 return ToWebLocalFrameImpl(frame).GetFrame(); | 352 return ToWebLocalFrameImpl(frame).GetFrame(); |
| 347 if (frame.IsWebRemoteFrame()) | 353 if (frame.IsWebRemoteFrame()) |
| 348 return ToWebRemoteFrameImpl(frame).GetFrame(); | 354 return ToWebRemoteFrameImpl(frame).GetFrame(); |
| 349 NOTREACHED(); | 355 NOTREACHED(); |
| 350 return nullptr; | 356 return nullptr; |
| 351 } | 357 } |
| 352 | 358 |
| 353 } // namespace blink | 359 } // namespace blink |
| OLD | NEW |