| 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 21 matching lines...) Expand all Loading... |
| 32 #include "platform/heap/Handle.h" | 32 #include "platform/heap/Handle.h" |
| 33 #include "wtf/OwnPtr.h" | 33 #include "wtf/OwnPtr.h" |
| 34 #include "wtf/text/WTFString.h" | 34 #include "wtf/text/WTFString.h" |
| 35 | 35 |
| 36 namespace blink { | 36 namespace blink { |
| 37 | 37 |
| 38 class ExceptionState; | 38 class ExceptionState; |
| 39 class Navigator; | 39 class Navigator; |
| 40 class Page; | 40 class Page; |
| 41 | 41 |
| 42 class NavigatorContentUtils FINAL : public NoBaseWillBeGarbageCollectedFinalized
<NavigatorContentUtils>, public WillBeHeapSupplement<Page> { | 42 class NavigatorContentUtils final : public NoBaseWillBeGarbageCollectedFinalized
<NavigatorContentUtils>, public WillBeHeapSupplement<Page> { |
| 43 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(NavigatorContentUtils); | 43 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(NavigatorContentUtils); |
| 44 public: | 44 public: |
| 45 virtual ~NavigatorContentUtils(); | 45 virtual ~NavigatorContentUtils(); |
| 46 | 46 |
| 47 static NavigatorContentUtils* from(Page&); | 47 static NavigatorContentUtils* from(Page&); |
| 48 static const char* supplementName(); | 48 static const char* supplementName(); |
| 49 | 49 |
| 50 static void registerProtocolHandler(Navigator&, const String& scheme, const
String& url, const String& title, ExceptionState&); | 50 static void registerProtocolHandler(Navigator&, const String& scheme, const
String& url, const String& title, ExceptionState&); |
| 51 static String isProtocolHandlerRegistered(Navigator&, const String& scheme,
const String& url, ExceptionState&); | 51 static String isProtocolHandlerRegistered(Navigator&, const String& scheme,
const String& url, ExceptionState&); |
| 52 static void unregisterProtocolHandler(Navigator&, const String& scheme, cons
t String& url, ExceptionState&); | 52 static void unregisterProtocolHandler(Navigator&, const String& scheme, cons
t String& url, ExceptionState&); |
| 53 | 53 |
| 54 static PassOwnPtrWillBeRawPtr<NavigatorContentUtils> create(PassOwnPtr<Navig
atorContentUtilsClient>); | 54 static PassOwnPtrWillBeRawPtr<NavigatorContentUtils> create(PassOwnPtr<Navig
atorContentUtilsClient>); |
| 55 | 55 |
| 56 virtual void trace(Visitor* visitor) OVERRIDE { WillBeHeapSupplement<Page>::
trace(visitor); } | 56 virtual void trace(Visitor* visitor) override { WillBeHeapSupplement<Page>::
trace(visitor); } |
| 57 | 57 |
| 58 void setClientForTest(PassOwnPtr<NavigatorContentUtilsClient> client) { m_cl
ient = client; } | 58 void setClientForTest(PassOwnPtr<NavigatorContentUtilsClient> client) { m_cl
ient = client; } |
| 59 | 59 |
| 60 private: | 60 private: |
| 61 explicit NavigatorContentUtils(PassOwnPtr<NavigatorContentUtilsClient> clien
t) | 61 explicit NavigatorContentUtils(PassOwnPtr<NavigatorContentUtilsClient> clien
t) |
| 62 : m_client(client) | 62 : m_client(client) |
| 63 { } | 63 { } |
| 64 | 64 |
| 65 NavigatorContentUtilsClient* client() { return m_client.get(); } | 65 NavigatorContentUtilsClient* client() { return m_client.get(); } |
| 66 | 66 |
| 67 OwnPtr<NavigatorContentUtilsClient> m_client; | 67 OwnPtr<NavigatorContentUtilsClient> m_client; |
| 68 }; | 68 }; |
| 69 | 69 |
| 70 } // namespace blink | 70 } // namespace blink |
| 71 | 71 |
| 72 #endif // NavigatorContentUtils_h | 72 #endif // NavigatorContentUtils_h |
| OLD | NEW |