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

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

Issue 2015003002: Disallow local/remote checks on subclasses of Frame, FrameOwner and DOMWindow. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: pure virtual Created 4 years, 6 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-2001 Lars Knoll <knoll@kde.org> 3 * 1999-2001 Lars Knoll <knoll@kde.org>
4 * 1999-2001 Antti Koivisto <koivisto@kde.org> 4 * 1999-2001 Antti Koivisto <koivisto@kde.org>
5 * 2000-2001 Simon Hausmann <hausmann@kde.org> 5 * 2000-2001 Simon Hausmann <hausmann@kde.org>
6 * 2000-2001 Dirk Mueller <mueller@kde.org> 6 * 2000-2001 Dirk Mueller <mueller@kde.org>
7 * 2000 Stefan Schimanski <1Stein@gmx.de> 7 * 2000 Stefan Schimanski <1Stein@gmx.de>
8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. 8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
9 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 9 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
10 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> 10 * Copyright (C) 2008 Eric Seidel <eric@webkit.org>
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 83
84 void init(); 84 void init();
85 void setView(FrameView*); 85 void setView(FrameView*);
86 void createView(const IntSize&, const Color&, bool, 86 void createView(const IntSize&, const Color&, bool,
87 ScrollbarMode = ScrollbarAuto, bool horizontalLock = false, 87 ScrollbarMode = ScrollbarAuto, bool horizontalLock = false,
88 ScrollbarMode = ScrollbarAuto, bool verticalLock = false); 88 ScrollbarMode = ScrollbarAuto, bool verticalLock = false);
89 89
90 // Frame overrides: 90 // Frame overrides:
91 ~LocalFrame() override; 91 ~LocalFrame() override;
92 DECLARE_VIRTUAL_TRACE(); 92 DECLARE_VIRTUAL_TRACE();
93 bool isLocalFrame() const override { return true; }
94 DOMWindow* domWindow() const override; 93 DOMWindow* domWindow() const override;
95 WindowProxy* windowProxy(DOMWrapperWorld&) override; 94 WindowProxy* windowProxy(DOMWrapperWorld&) override;
96 void navigate(Document& originDocument, const KURL&, bool replaceCurrentItem , UserGestureStatus) override; 95 void navigate(Document& originDocument, const KURL&, bool replaceCurrentItem , UserGestureStatus) override;
97 void navigate(const FrameLoadRequest&) override; 96 void navigate(const FrameLoadRequest&) override;
98 void reload(FrameLoadType, ClientRedirectPolicy) override; 97 void reload(FrameLoadType, ClientRedirectPolicy) override;
99 void detach(FrameDetachType) override; 98 void detach(FrameDetachType) override;
100 bool shouldClose() override; 99 bool shouldClose() override;
101 SecurityContext* securityContext() const override; 100 SecurityContext* securityContext() const override;
102 void printNavigationErrorMessage(const Frame&, const char* reason) override; 101 void printNavigationErrorMessage(const Frame&, const char* reason) override;
103 bool prepareForCommit() override; 102 bool prepareForCommit() override;
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 181
183 PluginData* pluginData() const; 182 PluginData* pluginData() const;
184 183
185 private: 184 private:
186 friend class FrameNavigationDisabler; 185 friend class FrameNavigationDisabler;
187 186
188 LocalFrame(FrameLoaderClient*, FrameHost*, FrameOwner*, ServiceRegistry*); 187 LocalFrame(FrameLoaderClient*, FrameHost*, FrameOwner*, ServiceRegistry*);
189 188
190 // Internal Frame helper overrides: 189 // Internal Frame helper overrides:
191 WindowProxyManager* getWindowProxyManager() const override; 190 WindowProxyManager* getWindowProxyManager() const override;
191 // Intentionally private to prevent redundant checks when the type is
192 // already LocalFrame.
193 bool isLocalFrame() const override { return true; }
194 bool isRemoteFrame() const override { return false; }
192 195
193 String localLayerTreeAsText(unsigned flags) const; 196 String localLayerTreeAsText(unsigned flags) const;
194 197
195 void enableNavigation() { --m_navigationDisableCount; } 198 void enableNavigation() { --m_navigationDisableCount; }
196 void disableNavigation() { ++m_navigationDisableCount; } 199 void disableNavigation() { ++m_navigationDisableCount; }
197 200
198 mutable FrameLoader m_loader; 201 mutable FrameLoader m_loader;
199 Member<NavigationScheduler> m_navigationScheduler; 202 Member<NavigationScheduler> m_navigationScheduler;
200 203
201 Member<FrameView> m_view; 204 Member<FrameView> m_view;
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 explicit FrameNavigationDisabler(LocalFrame&); 310 explicit FrameNavigationDisabler(LocalFrame&);
308 ~FrameNavigationDisabler(); 311 ~FrameNavigationDisabler();
309 312
310 private: 313 private:
311 Member<LocalFrame> m_frame; 314 Member<LocalFrame> m_frame;
312 }; 315 };
313 316
314 } // namespace blink 317 } // namespace blink
315 318
316 #endif // LocalFrame_h 319 #endif // LocalFrame_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/LocalDOMWindow.h ('k') | third_party/WebKit/Source/core/frame/RemoteDOMWindow.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698