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

Side by Side Diff: third_party/WebKit/Source/modules/navigatorcontentutils/testing/NavigatorContentUtilsClientMock.h

Issue 1864243004: Remove RawPtr from Source/modules Part 2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NavigatorContentUtilsClientMock_h 5 #ifndef NavigatorContentUtilsClientMock_h
6 #define NavigatorContentUtilsClientMock_h 6 #define NavigatorContentUtilsClientMock_h
7 7
8 #include "modules/navigatorcontentutils/NavigatorContentUtilsClient.h" 8 #include "modules/navigatorcontentutils/NavigatorContentUtilsClient.h"
9 #include "platform/heap/Handle.h" 9 #include "platform/heap/Handle.h"
10 #include "wtf/HashSet.h" 10 #include "wtf/HashSet.h"
11 #include "wtf/text/WTFString.h" 11 #include "wtf/text/WTFString.h"
12 12
13 namespace blink { 13 namespace blink {
14 14
15 class KURL; 15 class KURL;
16 16
17 // Provides a mock object for the navigatorcontentutils client. 17 // Provides a mock object for the navigatorcontentutils client.
18 class NavigatorContentUtilsClientMock final : public NavigatorContentUtilsClient { 18 class NavigatorContentUtilsClientMock final : public NavigatorContentUtilsClient {
19 public: 19 public:
20 static RawPtr<NavigatorContentUtilsClientMock> create() 20 static NavigatorContentUtilsClientMock* create()
21 { 21 {
22 return new NavigatorContentUtilsClientMock; 22 return new NavigatorContentUtilsClientMock;
23 } 23 }
24 24
25 ~NavigatorContentUtilsClientMock() override { } 25 ~NavigatorContentUtilsClientMock() override { }
26 26
27 virtual void registerProtocolHandler(const String& scheme, const KURL&, cons t String& title); 27 virtual void registerProtocolHandler(const String& scheme, const KURL&, cons t String& title);
28 28
29 virtual CustomHandlersState isProtocolHandlerRegistered(const String& scheme , const KURL&); 29 virtual CustomHandlersState isProtocolHandlerRegistered(const String& scheme , const KURL&);
30 virtual void unregisterProtocolHandler(const String& scheme, const KURL&); 30 virtual void unregisterProtocolHandler(const String& scheme, const KURL&);
31 31
32 private: 32 private:
33 NavigatorContentUtilsClientMock() { } 33 NavigatorContentUtilsClientMock() { }
34 34
35 typedef struct { 35 typedef struct {
36 String scheme; 36 String scheme;
37 KURL url; 37 KURL url;
38 String title; 38 String title;
39 } ProtocolInfo; 39 } ProtocolInfo;
40 40
41 typedef HashMap<String, ProtocolInfo> RegisteredProtocolMap; 41 typedef HashMap<String, ProtocolInfo> RegisteredProtocolMap;
42 RegisteredProtocolMap m_protocolMap; 42 RegisteredProtocolMap m_protocolMap;
43 }; 43 };
44 44
45 } // namespace blink 45 } // namespace blink
46 46
47 #endif // NavigatorContentUtilsClientMock_h 47 #endif // NavigatorContentUtilsClientMock_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698