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

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

Issue 1447563002: Implement frame attribution (FrameBlamer) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make sure blame context is initialized early enough Created 4 years, 8 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 #include "platform/RuntimeEnabledFeatures.h" 72 #include "platform/RuntimeEnabledFeatures.h"
73 #include "platform/ScriptForbiddenScope.h" 73 #include "platform/ScriptForbiddenScope.h"
74 #include "platform/graphics/GraphicsContext.h" 74 #include "platform/graphics/GraphicsContext.h"
75 #include "platform/graphics/StaticBitmapImage.h" 75 #include "platform/graphics/StaticBitmapImage.h"
76 #include "platform/graphics/paint/ClipRecorder.h" 76 #include "platform/graphics/paint/ClipRecorder.h"
77 #include "platform/graphics/paint/SkPictureBuilder.h" 77 #include "platform/graphics/paint/SkPictureBuilder.h"
78 #include "platform/graphics/paint/TransformDisplayItem.h" 78 #include "platform/graphics/paint/TransformDisplayItem.h"
79 #include "platform/text/TextStream.h" 79 #include "platform/text/TextStream.h"
80 #include "public/platform/WebFrameScheduler.h" 80 #include "public/platform/WebFrameScheduler.h"
81 #include "public/platform/WebScreenInfo.h" 81 #include "public/platform/WebScreenInfo.h"
82 #include "public/platform/WebSecurityOrigin.h"
83 #include "public/platform/WebViewScheduler.h" 82 #include "public/platform/WebViewScheduler.h"
84 #include "third_party/skia/include/core/SkImage.h" 83 #include "third_party/skia/include/core/SkImage.h"
85 #include "wtf/PassOwnPtr.h" 84 #include "wtf/PassOwnPtr.h"
86 #include "wtf/StdLibExtras.h" 85 #include "wtf/StdLibExtras.h"
87 86
88 namespace blink { 87 namespace blink {
89 88
90 using namespace HTMLNames; 89 using namespace HTMLNames;
91 90
92 namespace { 91 namespace {
(...skipping 743 matching lines...) Expand 10 before | Expand all | Expand 10 after
836 { 835 {
837 if (isLocalRoot()) 836 if (isLocalRoot())
838 m_instrumentingAgents = InstrumentingAgents::create(); 837 m_instrumentingAgents = InstrumentingAgents::create();
839 else 838 else
840 m_instrumentingAgents = localFrameRoot()->m_instrumentingAgents; 839 m_instrumentingAgents = localFrameRoot()->m_instrumentingAgents;
841 } 840 }
842 841
843 WebFrameScheduler* LocalFrame::frameScheduler() 842 WebFrameScheduler* LocalFrame::frameScheduler()
844 { 843 {
845 if (!m_frameScheduler.get()) 844 if (!m_frameScheduler.get())
846 m_frameScheduler = page()->chromeClient().createFrameScheduler(); 845 m_frameScheduler = page()->chromeClient().createFrameScheduler(client()- >frameBlameContext());
847 846
848 ASSERT(m_frameScheduler.get()); 847 ASSERT(m_frameScheduler.get());
849 return m_frameScheduler.get(); 848 return m_frameScheduler.get();
850 } 849 }
851 850
852 void LocalFrame::scheduleVisualUpdateUnlessThrottled() 851 void LocalFrame::scheduleVisualUpdateUnlessThrottled()
853 { 852 {
854 if (shouldThrottleRendering()) 853 if (shouldThrottleRendering())
855 return; 854 return;
856 page()->animator().scheduleVisualUpdate(this); 855 page()->animator().scheduleVisualUpdate(this);
857 } 856 }
858 857
859 void LocalFrame::updateSecurityOrigin(SecurityOrigin* origin) 858 void LocalFrame::updateSecurityOrigin(SecurityOrigin* origin)
860 { 859 {
861 script().updateSecurityOrigin(origin); 860 script().updateSecurityOrigin(origin);
862 frameScheduler()->setFrameOrigin(WebSecurityOrigin(origin));
863 } 861 }
864 862
865 DEFINE_WEAK_IDENTIFIER_MAP(LocalFrame); 863 DEFINE_WEAK_IDENTIFIER_MAP(LocalFrame);
866 864
867 FrameNavigationDisabler::FrameNavigationDisabler(LocalFrame& frame) 865 FrameNavigationDisabler::FrameNavigationDisabler(LocalFrame& frame)
868 : m_frame(&frame) 866 : m_frame(&frame)
869 { 867 {
870 m_frame->disableNavigation(); 868 m_frame->disableNavigation();
871 } 869 }
872 870
873 FrameNavigationDisabler::~FrameNavigationDisabler() 871 FrameNavigationDisabler::~FrameNavigationDisabler()
874 { 872 {
875 m_frame->enableNavigation(); 873 m_frame->enableNavigation();
876 } 874 }
877 875
878 } // namespace blink 876 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameClient.h ('k') | third_party/WebKit/Source/core/loader/EmptyClients.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698