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

Side by Side Diff: third_party/WebKit/Source/core/frame/Frame.cpp

Issue 2254533002: [FeaturePolicy] Initial implementation of Feature Policy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fp-flag
Patch Set: Remove overaggressive bool transform Created 4 years, 3 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
3 * 1999 Lars Knoll <knoll@kde.org> 3 * 1999 Lars Knoll <knoll@kde.org>
4 * 1999 Antti Koivisto <koivisto@kde.org> 4 * 1999 Antti Koivisto <koivisto@kde.org>
5 * 2000 Simon Hausmann <hausmann@kde.org> 5 * 2000 Simon Hausmann <hausmann@kde.org>
6 * 2000 Stefan Schimanski <1Stein@gmx.de> 6 * 2000 Stefan Schimanski <1Stein@gmx.de>
7 * 2001 George Staikos <staikos@kde.org> 7 * 2001 George Staikos <staikos@kde.org>
8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. 8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
9 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com> 9 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com>
10 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 10 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
(...skipping 30 matching lines...) Expand all
41 #include "core/inspector/InstanceCounters.h" 41 #include "core/inspector/InstanceCounters.h"
42 #include "core/layout/LayoutPart.h" 42 #include "core/layout/LayoutPart.h"
43 #include "core/layout/api/LayoutPartItem.h" 43 #include "core/layout/api/LayoutPartItem.h"
44 #include "core/loader/EmptyClients.h" 44 #include "core/loader/EmptyClients.h"
45 #include "core/loader/FrameLoaderClient.h" 45 #include "core/loader/FrameLoaderClient.h"
46 #include "core/loader/NavigationScheduler.h" 46 #include "core/loader/NavigationScheduler.h"
47 #include "core/page/FocusController.h" 47 #include "core/page/FocusController.h"
48 #include "core/page/Page.h" 48 #include "core/page/Page.h"
49 #include "platform/Histogram.h" 49 #include "platform/Histogram.h"
50 #include "platform/UserGestureIndicator.h" 50 #include "platform/UserGestureIndicator.h"
51 #include "platform/feature_policy/FeaturePolicy.h"
51 52
52 namespace blink { 53 namespace blink {
53 54
54 using namespace HTMLNames; 55 using namespace HTMLNames;
55 56
56 Frame::~Frame() 57 Frame::~Frame()
57 { 58 {
58 InstanceCounters::decrementCounter(InstanceCounters::FrameCounter); 59 InstanceCounters::decrementCounter(InstanceCounters::FrameCounter);
59 ASSERT(!m_owner); 60 ASSERT(!m_owner);
60 } 61 }
61 62
62 DEFINE_TRACE(Frame) 63 DEFINE_TRACE(Frame)
63 { 64 {
64 visitor->trace(m_treeNode); 65 visitor->trace(m_treeNode);
65 visitor->trace(m_host); 66 visitor->trace(m_host);
66 visitor->trace(m_owner); 67 visitor->trace(m_owner);
67 visitor->trace(m_client); 68 visitor->trace(m_client);
69 visitor->trace(m_featurePolicy);
68 } 70 }
69 71
70 void Frame::detach(FrameDetachType type) 72 void Frame::detach(FrameDetachType type)
71 { 73 {
72 ASSERT(m_client); 74 ASSERT(m_client);
73 m_client->setOpener(0); 75 m_client->setOpener(0);
74 domWindow()->resetLocation(); 76 domWindow()->resetLocation();
75 disconnectOwnerElement(); 77 disconnectOwnerElement();
76 // After this, we must no longer talk to the client since this clears 78 // After this, we must no longer talk to the client since this clears
77 // its owning reference back to our owning LocalFrame. 79 // its owning reference back to our owning LocalFrame.
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 for (size_t i = 0; i < childFrames.size(); ++i) 308 for (size_t i = 0; i < childFrames.size(); ++i)
307 childFrames[i]->didChangeVisibilityState(); 309 childFrames[i]->didChangeVisibilityState();
308 } 310 }
309 311
310 Frame::Frame(FrameClient* client, FrameHost* host, FrameOwner* owner) 312 Frame::Frame(FrameClient* client, FrameHost* host, FrameOwner* owner)
311 : m_treeNode(this) 313 : m_treeNode(this)
312 , m_host(host) 314 , m_host(host)
313 , m_owner(owner) 315 , m_owner(owner)
314 , m_client(client) 316 , m_client(client)
315 , m_isLoading(false) 317 , m_isLoading(false)
318 , m_featurePolicy(nullptr)
316 { 319 {
317 InstanceCounters::incrementCounter(InstanceCounters::FrameCounter); 320 InstanceCounters::incrementCounter(InstanceCounters::FrameCounter);
318 321
319 ASSERT(page()); 322 ASSERT(page());
320 323
321 if (m_owner) 324 if (m_owner)
322 m_owner->setContentFrame(*this); 325 m_owner->setContentFrame(*this);
323 else 326 else
324 page()->setMainFrame(this); 327 page()->setMainFrame(this);
325 } 328 }
326 329
327 } // namespace blink 330 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698