Chromium Code Reviews| 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 20 matching lines...) Expand all Loading... | |
| 31 #include "platform/RefCountedSupplement.h" | 31 #include "platform/RefCountedSupplement.h" |
| 32 #include "wtf/PassRefPtr.h" | 32 #include "wtf/PassRefPtr.h" |
| 33 #include "wtf/text/WTFString.h" | 33 #include "wtf/text/WTFString.h" |
| 34 | 34 |
| 35 namespace WebCore { | 35 namespace WebCore { |
| 36 | 36 |
| 37 class ExceptionState; | 37 class ExceptionState; |
| 38 class Navigator; | 38 class Navigator; |
| 39 class Page; | 39 class Page; |
| 40 | 40 |
| 41 class NavigatorContentUtils FINAL : public RefCountedSupplement<Page, NavigatorC ontentUtils> { | 41 class NavigatorContentUtils FINAL : public Supplement<Page> { |
| 42 public: | 42 public: |
| 43 virtual ~NavigatorContentUtils(); | 43 virtual ~NavigatorContentUtils(); |
| 44 | 44 |
| 45 static NavigatorContentUtils* from(Page&); | |
| 45 static const char* supplementName(); | 46 static const char* supplementName(); |
| 46 static NavigatorContentUtils* from(Page&); | |
| 47 | 47 |
| 48 static void registerProtocolHandler(Navigator&, const String& scheme, const String& url, const String& title, ExceptionState&); | 48 static void registerProtocolHandler(Navigator&, const String& scheme, const String& url, const String& title, ExceptionState&); |
| 49 | 49 |
| 50 static String isProtocolHandlerRegistered(Navigator&, const String& scheme, const String& url, ExceptionState&); | 50 static String isProtocolHandlerRegistered(Navigator&, const String& scheme, const String& url, ExceptionState&); |
| 51 static void unregisterProtocolHandler(Navigator&, const String& scheme, cons t String& url, ExceptionState&); | 51 static void unregisterProtocolHandler(Navigator&, const String& scheme, cons t String& url, ExceptionState&); |
| 52 | 52 |
| 53 static PassRefPtr<NavigatorContentUtils> create(PassOwnPtr<NavigatorContentU tilsClient>); | 53 static PassOwnPtr<NavigatorContentUtils> create(PassOwnPtr<NavigatorContentU tilsClient>); |
| 54 | |
| 55 virtual void trace(Visitor*) OVERRIDE | |
| 56 { | |
| 57 // FIXME: Oilpan: Move Page to the managed heap before using this trace method. | |
|
haraken
2014/04/12 15:19:59
Remove this comment. Page is already on oilpan's h
| |
| 58 } | |
| 54 | 59 |
| 55 private: | 60 private: |
| 56 explicit NavigatorContentUtils(PassOwnPtr<NavigatorContentUtilsClient> clien t) | 61 explicit NavigatorContentUtils(PassOwnPtr<NavigatorContentUtilsClient> clien t) |
| 57 : m_client(client) | 62 : m_client(client) |
| 58 { } | 63 { } |
| 59 | 64 |
| 60 NavigatorContentUtilsClient* client() { return m_client.get(); } | 65 NavigatorContentUtilsClient* client() { return m_client.get(); } |
| 61 | 66 |
| 62 OwnPtr<NavigatorContentUtilsClient> m_client; | 67 OwnPtr<NavigatorContentUtilsClient> m_client; |
| 63 }; | 68 }; |
| 64 | 69 |
| 65 } // namespace WebCore | 70 } // namespace WebCore |
| 66 | 71 |
| 67 #endif // NavigatorContentUtils_h | 72 #endif // NavigatorContentUtils_h |
| OLD | NEW |