OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 | 47 |
48 typedef String ErrorString; | 48 typedef String ErrorString; |
49 | 49 |
50 class MODULES_EXPORT InspectorDatabaseAgent final : public InspectorBaseAgent<In
spectorDatabaseAgent, InspectorFrontend::Database>, public InspectorBackendDispa
tcher::DatabaseCommandHandler { | 50 class MODULES_EXPORT InspectorDatabaseAgent final : public InspectorBaseAgent<In
spectorDatabaseAgent, InspectorFrontend::Database>, public InspectorBackendDispa
tcher::DatabaseCommandHandler { |
51 WTF_MAKE_NONCOPYABLE(InspectorDatabaseAgent); | 51 WTF_MAKE_NONCOPYABLE(InspectorDatabaseAgent); |
52 public: | 52 public: |
53 static PassOwnPtrWillBeRawPtr<InspectorDatabaseAgent> create(Page* page) | 53 static PassOwnPtrWillBeRawPtr<InspectorDatabaseAgent> create(Page* page) |
54 { | 54 { |
55 return adoptPtrWillBeNoop(new InspectorDatabaseAgent(page)); | 55 return adoptPtrWillBeNoop(new InspectorDatabaseAgent(page)); |
56 } | 56 } |
57 virtual ~InspectorDatabaseAgent(); | 57 ~InspectorDatabaseAgent() override; |
58 DECLARE_VIRTUAL_TRACE(); | 58 DECLARE_VIRTUAL_TRACE(); |
59 | 59 |
60 void disable(ErrorString*) override; | 60 void disable(ErrorString*) override; |
61 void restore() override; | 61 void restore() override; |
62 void didCommitLoadForLocalFrame(LocalFrame*) override; | 62 void didCommitLoadForLocalFrame(LocalFrame*) override; |
63 | 63 |
64 // Called from the front-end. | 64 // Called from the front-end. |
65 virtual void enable(ErrorString*) override; | 65 void enable(ErrorString*) override; |
66 virtual void getDatabaseTableNames(ErrorString*, const String& databaseId, R
efPtr<TypeBuilder::Array<String>>& names) override; | 66 void getDatabaseTableNames(ErrorString*, const String& databaseId, RefPtr<Ty
peBuilder::Array<String>>& names) override; |
67 virtual void executeSQL(ErrorString*, const String& databaseId, const String
& query, PassRefPtrWillBeRawPtr<ExecuteSQLCallback>) override; | 67 void executeSQL(ErrorString*, const String& databaseId, const String& query,
PassRefPtrWillBeRawPtr<ExecuteSQLCallback>) override; |
68 | 68 |
69 void didOpenDatabase(Database*, const String& domain, const String& name, co
nst String& version); | 69 void didOpenDatabase(Database*, const String& domain, const String& name, co
nst String& version); |
70 private: | 70 private: |
71 explicit InspectorDatabaseAgent(Page*); | 71 explicit InspectorDatabaseAgent(Page*); |
72 | 72 |
73 Database* databaseForId(const String& databaseId); | 73 Database* databaseForId(const String& databaseId); |
74 InspectorDatabaseResource* findByFileName(const String& fileName); | 74 InspectorDatabaseResource* findByFileName(const String& fileName); |
75 | 75 |
76 Page* m_page; | 76 Page* m_page; |
77 typedef PersistentHeapHashMapWillBeHeapHashMap<String, Member<InspectorDatab
aseResource>> DatabaseResourcesHeapMap; | 77 typedef PersistentHeapHashMapWillBeHeapHashMap<String, Member<InspectorDatab
aseResource>> DatabaseResourcesHeapMap; |
78 DatabaseResourcesHeapMap m_resources; | 78 DatabaseResourcesHeapMap m_resources; |
79 bool m_enabled; | 79 bool m_enabled; |
80 }; | 80 }; |
81 | 81 |
82 } // namespace blink | 82 } // namespace blink |
83 | 83 |
84 #endif // !defined(InspectorDatabaseAgent_h) | 84 #endif // !defined(InspectorDatabaseAgent_h) |
OLD | NEW |