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

Unified Diff: Source/core/page/NavigatorOnLine.h

Issue 23308006: Introduce NavigatorOnLine interface (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: No change Created 7 years, 4 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 | « Source/core/page/NavigatorBase.cpp ('k') | Source/core/page/NavigatorOnLine.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/NavigatorOnLine.h
diff --git a/Source/core/svg/SVGUnknownElement.cpp b/Source/core/page/NavigatorOnLine.h
similarity index 85%
copy from Source/core/svg/SVGUnknownElement.cpp
copy to Source/core/page/NavigatorOnLine.h
index ecc0d2f2f186434ad83a947d92cca241c2bfa3b0..934cecbed1a524508ede97937b9bf15e435d9d9f 100644
--- a/Source/core/svg/SVGUnknownElement.cpp
+++ b/Source/core/page/NavigatorOnLine.h
@@ -28,14 +28,21 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "config.h"
-#include "core/svg/SVGUnknownElement.h"
+#ifndef NavigatorOnLine_h
+#define NavigatorOnLine_h
+
+#include "core/platform/network/NetworkStateNotifier.h"
namespace WebCore {
-SVGUnknownElement::SVGUnknownElement(const QualifiedName& tagName, Document* document)
- : SVGElement(tagName, document)
-{
+class NavigatorOnLine {
haraken 2013/08/20 10:28:51 Nit: Previously you used a namespace for this kind
do-not-use 2013/08/20 10:31:49 I used a namespace first then got linking errors a
+public:
+ static bool onLine(void*)
+ {
+ return networkStateNotifier().onLine();
+ }
+};
+
}
-} // namespace WebCore
+#endif // NavigatorOnLine_h
« no previous file with comments | « Source/core/page/NavigatorBase.cpp ('k') | Source/core/page/NavigatorOnLine.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698