OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011, Google Inc. All rights reserved. | 2 * Copyright (C) 2011, Google Inc. All rights reserved. |
3 * Copyright (C) 2012, Samsung Electronics. All rights reserved. | 3 * Copyright (C) 2012, Samsung Electronics. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 22 matching lines...) Expand all Loading... |
33 #include "platform/heap/Handle.h" | 33 #include "platform/heap/Handle.h" |
34 #include "wtf/OwnPtr.h" | 34 #include "wtf/OwnPtr.h" |
35 #include "wtf/text/WTFString.h" | 35 #include "wtf/text/WTFString.h" |
36 | 36 |
37 namespace blink { | 37 namespace blink { |
38 | 38 |
39 class ExceptionState; | 39 class ExceptionState; |
40 class LocalFrame; | 40 class LocalFrame; |
41 class Navigator; | 41 class Navigator; |
42 | 42 |
43 class MODULES_EXPORT NavigatorContentUtils final : public GarbageCollectedFinali
zed<NavigatorContentUtils>, public HeapSupplement<LocalFrame> { | 43 class MODULES_EXPORT NavigatorContentUtils final : public GarbageCollectedFinali
zed<NavigatorContentUtils>, public Supplement<LocalFrame> { |
44 USING_GARBAGE_COLLECTED_MIXIN(NavigatorContentUtils); | 44 USING_GARBAGE_COLLECTED_MIXIN(NavigatorContentUtils); |
45 public: | 45 public: |
46 virtual ~NavigatorContentUtils(); | 46 virtual ~NavigatorContentUtils(); |
47 | 47 |
48 static NavigatorContentUtils* from(LocalFrame&); | 48 static NavigatorContentUtils* from(LocalFrame&); |
49 static const char* supplementName(); | 49 static const char* supplementName(); |
50 | 50 |
51 static void registerProtocolHandler(Navigator&, const String& scheme, const
String& url, const String& title, ExceptionState&); | 51 static void registerProtocolHandler(Navigator&, const String& scheme, const
String& url, const String& title, ExceptionState&); |
52 static String isProtocolHandlerRegistered(Navigator&, const String& scheme,
const String& url, ExceptionState&); | 52 static String isProtocolHandlerRegistered(Navigator&, const String& scheme,
const String& url, ExceptionState&); |
53 static void unregisterProtocolHandler(Navigator&, const String& scheme, cons
t String& url, ExceptionState&); | 53 static void unregisterProtocolHandler(Navigator&, const String& scheme, cons
t String& url, ExceptionState&); |
54 | 54 |
55 static RawPtr<NavigatorContentUtils> create(RawPtr<NavigatorContentUtilsClie
nt>); | 55 static RawPtr<NavigatorContentUtils> create(RawPtr<NavigatorContentUtilsClie
nt>); |
56 | 56 |
57 DEFINE_INLINE_VIRTUAL_TRACE() | 57 DEFINE_INLINE_VIRTUAL_TRACE() |
58 { | 58 { |
59 visitor->trace(m_client); | 59 visitor->trace(m_client); |
60 HeapSupplement<LocalFrame>::trace(visitor); | 60 Supplement<LocalFrame>::trace(visitor); |
61 } | 61 } |
62 | 62 |
63 void setClientForTest(RawPtr<NavigatorContentUtilsClient> client) { m_client
= client; } | 63 void setClientForTest(RawPtr<NavigatorContentUtilsClient> client) { m_client
= client; } |
64 | 64 |
65 private: | 65 private: |
66 explicit NavigatorContentUtils(RawPtr<NavigatorContentUtilsClient> client) | 66 explicit NavigatorContentUtils(RawPtr<NavigatorContentUtilsClient> client) |
67 : m_client(client) | 67 : m_client(client) |
68 { | 68 { |
69 } | 69 } |
70 | 70 |
71 NavigatorContentUtilsClient* client() { return m_client.get(); } | 71 NavigatorContentUtilsClient* client() { return m_client.get(); } |
72 | 72 |
73 Member<NavigatorContentUtilsClient> m_client; | 73 Member<NavigatorContentUtilsClient> m_client; |
74 }; | 74 }; |
75 | 75 |
76 } // namespace blink | 76 } // namespace blink |
77 | 77 |
78 #endif // NavigatorContentUtils_h | 78 #endif // NavigatorContentUtils_h |
OLD | NEW |