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

Side by Side Diff: Source/modules/navigatorcontentutils/NavigatorContentUtils.h

Issue 293403002: Introduce mock test system for navigator content utils (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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 unified diff | Download patch
OLDNEW
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 29 matching lines...) Expand all
40 40
41 class NavigatorContentUtils FINAL : public NoBaseWillBeGarbageCollectedFinalized <NavigatorContentUtils>, public WillBeHeapSupplement<Page> { 41 class NavigatorContentUtils FINAL : public NoBaseWillBeGarbageCollectedFinalized <NavigatorContentUtils>, public WillBeHeapSupplement<Page> {
42 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(NavigatorContentUtils); 42 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(NavigatorContentUtils);
43 public: 43 public:
44 virtual ~NavigatorContentUtils(); 44 virtual ~NavigatorContentUtils();
45 45
46 static NavigatorContentUtils* from(Page&); 46 static NavigatorContentUtils* from(Page&);
47 static const char* supplementName(); 47 static const char* supplementName();
48 48
49 static void registerProtocolHandler(Navigator&, const String& scheme, const String& url, const String& title, ExceptionState&); 49 static void registerProtocolHandler(Navigator&, const String& scheme, const String& url, const String& title, ExceptionState&);
50
51 static String isProtocolHandlerRegistered(Navigator&, const String& scheme, const String& url, ExceptionState&); 50 static String isProtocolHandlerRegistered(Navigator&, const String& scheme, const String& url, ExceptionState&);
52 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&);
53 52
54 static PassOwnPtrWillBeRawPtr<NavigatorContentUtils> create(PassOwnPtr<Navig atorContentUtilsClient>); 53 static PassOwnPtrWillBeRawPtr<NavigatorContentUtils> create(PassOwnPtr<Navig atorContentUtilsClient>);
55 54
56 virtual void trace(Visitor* visitor) OVERRIDE { WillBeHeapSupplement<Page>:: trace(visitor); } 55 virtual void trace(Visitor* visitor) OVERRIDE { WillBeHeapSupplement<Page>:: trace(visitor); }
57 56
57 void setClientForTest(PassOwnPtr<NavigatorContentUtilsClient> client) { m_cl ient = client; }
58
58 private: 59 private:
59 explicit NavigatorContentUtils(PassOwnPtr<NavigatorContentUtilsClient> clien t) 60 explicit NavigatorContentUtils(PassOwnPtr<NavigatorContentUtilsClient> clien t)
60 : m_client(client) 61 : m_client(client)
61 { } 62 { }
62 63
63 NavigatorContentUtilsClient* client() { return m_client.get(); } 64 NavigatorContentUtilsClient* client() { return m_client.get(); }
64 65
65 OwnPtr<NavigatorContentUtilsClient> m_client; 66 OwnPtr<NavigatorContentUtilsClient> m_client;
66 }; 67 };
67 68
68 } // namespace WebCore 69 } // namespace WebCore
69 70
70 #endif // NavigatorContentUtils_h 71 #endif // NavigatorContentUtils_h
OLDNEW
« no previous file with comments | « Source/modules/modules.gypi ('k') | Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698