| 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 "bindings/core/v8/WindowProxyManager.h" | 7 #include "bindings/core/v8/WindowProxyManager.h" |
| 8 #include "core/HTMLNames.h" | 8 #include "core/HTMLNames.h" |
| 9 #include "core/frame/FrameView.h" | 9 #include "core/frame/FrameView.h" |
| 10 #include "core/frame/LocalFrame.h" | 10 #include "core/frame/LocalFrame.h" |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 owner->SetScrollingMode(properties.scrolling_mode); | 163 owner->SetScrollingMode(properties.scrolling_mode); |
| 164 owner->SetMarginWidth(properties.margin_width); | 164 owner->SetMarginWidth(properties.margin_width); |
| 165 owner->SetMarginHeight(properties.margin_height); | 165 owner->SetMarginHeight(properties.margin_height); |
| 166 owner->SetAllowFullscreen(properties.allow_fullscreen); | 166 owner->SetAllowFullscreen(properties.allow_fullscreen); |
| 167 owner->SetAllowPaymentRequest(properties.allow_payment_request); | 167 owner->SetAllowPaymentRequest(properties.allow_payment_request); |
| 168 owner->SetIsDisplayNone(properties.is_display_none); | 168 owner->SetIsDisplayNone(properties.is_display_none); |
| 169 owner->SetCsp(properties.required_csp); | 169 owner->SetCsp(properties.required_csp); |
| 170 owner->SetAllowedFeatures(properties.allowed_features); | 170 owner->SetAllowedFeatures(properties.allowed_features); |
| 171 } | 171 } |
| 172 | 172 |
| 173 void WebFrame::Collapse(bool collapsed) { |
| 174 FrameOwner* owner = ToCoreFrame(*this)->Owner(); |
| 175 DCHECK(owner->IsLocal()); |
| 176 ToHTMLFrameOwnerElement(owner)->SetCollapsedByClient(collapsed); |
| 177 } |
| 178 |
| 173 WebFrame* WebFrame::Opener() const { | 179 WebFrame* WebFrame::Opener() const { |
| 174 return opener_; | 180 return opener_; |
| 175 } | 181 } |
| 176 | 182 |
| 177 void WebFrame::SetOpener(WebFrame* opener) { | 183 void WebFrame::SetOpener(WebFrame* opener) { |
| 178 if (opener_) | 184 if (opener_) |
| 179 opener_->opened_frame_tracker_->Remove(this); | 185 opener_->opened_frame_tracker_->Remove(this); |
| 180 if (opener) | 186 if (opener) |
| 181 opener->opened_frame_tracker_->Add(this); | 187 opener->opened_frame_tracker_->Add(this); |
| 182 opener_ = opener; | 188 opener_ = opener; |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 333 Frame* WebFrame::ToCoreFrame(const WebFrame& frame) { | 339 Frame* WebFrame::ToCoreFrame(const WebFrame& frame) { |
| 334 if (frame.IsWebLocalFrame()) | 340 if (frame.IsWebLocalFrame()) |
| 335 return ToWebLocalFrameImpl(frame).GetFrame(); | 341 return ToWebLocalFrameImpl(frame).GetFrame(); |
| 336 if (frame.IsWebRemoteFrame()) | 342 if (frame.IsWebRemoteFrame()) |
| 337 return ToWebRemoteFrameImpl(frame).GetFrame(); | 343 return ToWebRemoteFrameImpl(frame).GetFrame(); |
| 338 NOTREACHED(); | 344 NOTREACHED(); |
| 339 return nullptr; | 345 return nullptr; |
| 340 } | 346 } |
| 341 | 347 |
| 342 } // namespace blink | 348 } // namespace blink |
| OLD | NEW |