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

Side by Side Diff: Source/core/frame/RemoteFrame.cpp

Issue 520213002: Make SecurityContext available in RemoteFrames. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 6 years, 1 month 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 | « Source/core/frame/RemoteFrame.h ('k') | Source/web/WebFrame.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 // 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)
18 , m_securityContext(RemoteSecurityContext::create())
17 { 19 {
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 {
(...skipping 16 matching lines...) Expand all
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
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
OLDNEW
« no previous file with comments | « Source/core/frame/RemoteFrame.h ('k') | Source/web/WebFrame.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698