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 "config.h" | 5 #include "config.h" |
6 #include "core/frame/RemoteFrame.h" | 6 #include "core/frame/RemoteFrame.h" |
7 | 7 |
8 #include "core/dom/RemoteSecurityContext.h" | |
8 #include "core/frame/RemoteFrameClient.h" | 9 #include "core/frame/RemoteFrameClient.h" |
9 #include "core/frame/RemoteFrameView.h" | 10 #include "core/frame/RemoteFrameView.h" |
10 #include "core/html/HTMLFrameOwnerElement.h" | 11 #include "core/html/HTMLFrameOwnerElement.h" |
11 #include "platform/weborigin/SecurityPolicy.h" | 12 #include "platform/weborigin/SecurityPolicy.h" |
12 | 13 |
13 namespace blink { | 14 namespace blink { |
14 | 15 |
15 inline RemoteFrame::RemoteFrame(RemoteFrameClient* client, FrameHost* host, Fram eOwner* owner) | 16 inline RemoteFrame::RemoteFrame(RemoteFrameClient* client, FrameHost* host, Fram eOwner* owner) |
16 : Frame(client, host, owner) | 17 : Frame(client, host, owner) |
17 { | 18 { |
19 m_securityContext = RemoteSecurityContext::create(); | |
dcheng
2014/11/18 23:31:40
Nit: move this into the initializer list.
alexmos
2014/11/19 00:33:04
Done.
| |
18 } | 20 } |
19 | 21 |
20 PassRefPtrWillBeRawPtr<RemoteFrame> RemoteFrame::create(RemoteFrameClient* clien t, FrameHost* host, FrameOwner* owner) | 22 PassRefPtrWillBeRawPtr<RemoteFrame> RemoteFrame::create(RemoteFrameClient* clien t, FrameHost* host, FrameOwner* owner) |
21 { | 23 { |
22 return adoptRefWillBeNoop(new RemoteFrame(client, host, owner)); | 24 return adoptRefWillBeNoop(new RemoteFrame(client, host, owner)); |
23 } | 25 } |
24 | 26 |
25 RemoteFrame::~RemoteFrame() | 27 RemoteFrame::~RemoteFrame() |
26 { | 28 { |
27 setView(nullptr); | 29 setView(nullptr); |
(...skipping 15 matching lines...) Expand all Loading... | |
43 } | 45 } |
44 | 46 |
45 void RemoteFrame::detach() | 47 void RemoteFrame::detach() |
46 { | 48 { |
47 detachChildren(); | 49 detachChildren(); |
48 if (!client()) | 50 if (!client()) |
49 return; | 51 return; |
50 Frame::detach(); | 52 Frame::detach(); |
51 } | 53 } |
52 | 54 |
55 RemoteSecurityContext* RemoteFrame::securityContext() const | |
56 { | |
57 return m_securityContext.get(); | |
58 } | |
59 | |
53 void RemoteFrame::forwardInputEvent(Event* event) | 60 void RemoteFrame::forwardInputEvent(Event* event) |
54 { | 61 { |
55 remoteFrameClient()->forwardInputEvent(event); | 62 remoteFrameClient()->forwardInputEvent(event); |
56 } | 63 } |
57 | 64 |
58 void RemoteFrame::setView(PassRefPtrWillBeRawPtr<RemoteFrameView> view) | 65 void RemoteFrame::setView(PassRefPtrWillBeRawPtr<RemoteFrameView> view) |
59 { | 66 { |
60 // Oilpan: as RemoteFrameView performs no finalization actions, | 67 // Oilpan: as RemoteFrameView performs no finalization actions, |
61 // no explicit dispose() of it needed here. (cf. FrameView::dispose().) | 68 // no explicit dispose() of it needed here. (cf. FrameView::dispose().) |
62 m_view = view; | 69 m_view = view; |
(...skipping 10 matching lines...) Expand all Loading... | |
73 owner->setWidget(view); | 80 owner->setWidget(view); |
74 } | 81 } |
75 } | 82 } |
76 | 83 |
77 RemoteFrameClient* RemoteFrame::remoteFrameClient() const | 84 RemoteFrameClient* RemoteFrame::remoteFrameClient() const |
78 { | 85 { |
79 return static_cast<RemoteFrameClient*>(client()); | 86 return static_cast<RemoteFrameClient*>(client()); |
80 } | 87 } |
81 | 88 |
82 } // namespace blink | 89 } // namespace blink |
OLD | NEW |