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

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

Issue 2694283003: Annotate ScriptWrappable-embedding singletons.
Patch Set: add XPathValue singleton Created 3 years, 10 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 8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
9 * rights reserved. 9 * rights reserved.
10 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com> 10 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com>
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 117
118 return tree().parent()->isRemoteFrame(); 118 return tree().parent()->isRemoteFrame();
119 } 119 }
120 120
121 HTMLFrameOwnerElement* Frame::deprecatedLocalOwner() const { 121 HTMLFrameOwnerElement* Frame::deprecatedLocalOwner() const {
122 return m_owner && m_owner->isLocal() ? toHTMLFrameOwnerElement(m_owner) 122 return m_owner && m_owner->isLocal() ? toHTMLFrameOwnerElement(m_owner)
123 : nullptr; 123 : nullptr;
124 } 124 }
125 125
126 static ChromeClient& emptyChromeClient() { 126 static ChromeClient& emptyChromeClient() {
127 ALLOW_UNSAFE_SINGLETON()
127 DEFINE_STATIC_LOCAL(EmptyChromeClient, client, (EmptyChromeClient::create())); 128 DEFINE_STATIC_LOCAL(EmptyChromeClient, client, (EmptyChromeClient::create()));
128 return client; 129 return client;
129 } 130 }
130 131
131 ChromeClient& Frame::chromeClient() const { 132 ChromeClient& Frame::chromeClient() const {
132 if (Page* page = this->page()) 133 if (Page* page = this->page())
133 return page->chromeClient(); 134 return page->chromeClient();
134 return emptyChromeClient(); 135 return emptyChromeClient();
135 } 136 }
136 137
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 416
416 ASSERT(page()); 417 ASSERT(page());
417 418
418 if (m_owner) 419 if (m_owner)
419 m_owner->setContentFrame(*this); 420 m_owner->setContentFrame(*this);
420 else 421 else
421 page()->setMainFrame(this); 422 page()->setMainFrame(this);
422 } 423 }
423 424
424 } // namespace blink 425 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/events/EventDispatcher.cpp ('k') | third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698