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

Unified Diff: third_party/WebKit/Source/core/dom/Fullscreen.cpp

Issue 2053673002: Move Fullscreen static helpers to an anonymous namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/dom/Fullscreen.cpp
diff --git a/third_party/WebKit/Source/core/dom/Fullscreen.cpp b/third_party/WebKit/Source/core/dom/Fullscreen.cpp
index 36048968b60f50a073cf18c89738355f4b3e4e16..4e1c4ec2d013d40da00576c8c27377f27ef50b28 100644
--- a/third_party/WebKit/Source/core/dom/Fullscreen.cpp
+++ b/third_party/WebKit/Source/core/dom/Fullscreen.cpp
@@ -52,7 +52,9 @@ namespace blink {
using namespace HTMLNames;
-static bool fullscreenIsAllowedForAllOwners(const Document& document)
+namespace {
+
+bool fullscreenIsAllowedForAllOwners(const Document& document)
{
if (!document.frame())
return false;
@@ -64,14 +66,14 @@ static bool fullscreenIsAllowedForAllOwners(const Document& document)
return true;
}
-static bool fullscreenIsSupported(const Document& document)
+bool fullscreenIsSupported(const Document& document)
{
// Fullscreen is supported if there is no previously-established user preference,
// security risk, or platform limitation.
return !document.settings() || document.settings()->fullscreenSupported();
}
-static bool fullscreenElementReady(const Element& element)
+bool fullscreenElementReady(const Element& element)
{
// A fullscreen element ready check for an element |element| returns true if all of the
// following are true, and false otherwise:
@@ -107,12 +109,12 @@ static bool fullscreenElementReady(const Element& element)
return true;
}
-static bool isPrefixed(const AtomicString& type)
+bool isPrefixed(const AtomicString& type)
{
return type == EventTypeNames::webkitfullscreenchange || type == EventTypeNames::webkitfullscreenerror;
}
-static Event* createEvent(const AtomicString& type, EventTarget& target)
+Event* createEvent(const AtomicString& type, EventTarget& target)
{
EventInit initializer;
initializer.setBubbles(isPrefixed(type));
@@ -121,6 +123,8 @@ static Event* createEvent(const AtomicString& type, EventTarget& target)
return event;
}
+} // anonymous namespace
+
const char* Fullscreen::supplementName()
{
return "Fullscreen";
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698