| 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 : public InspectorBaseAgent<protocol::Database::Metainfo> { | 47 : public InspectorBaseAgent<protocol::Database::Metainfo> { |
| 48 WTF_MAKE_NONCOPYABLE(InspectorDatabaseAgent); | 48 WTF_MAKE_NONCOPYABLE(InspectorDatabaseAgent); |
| 49 | 49 |
| 50 public: | 50 public: |
| 51 static InspectorDatabaseAgent* create(Page* page) { | 51 static InspectorDatabaseAgent* create(Page* page) { |
| 52 return new InspectorDatabaseAgent(page); | 52 return new InspectorDatabaseAgent(page); |
| 53 } | 53 } |
| 54 ~InspectorDatabaseAgent() override; | 54 ~InspectorDatabaseAgent() override; |
| 55 DECLARE_VIRTUAL_TRACE(); | 55 DECLARE_VIRTUAL_TRACE(); |
| 56 | 56 |
| 57 void disable(ErrorString*) override; | 57 Response disable() override; |
| 58 void restore() override; | 58 void restore() override; |
| 59 void didCommitLoadForLocalFrame(LocalFrame*) override; | 59 void didCommitLoadForLocalFrame(LocalFrame*) override; |
| 60 | 60 |
| 61 // Called from the front-end. | 61 // Called from the front-end. |
| 62 void enable(ErrorString*) override; | 62 Response enable() override; |
| 63 void getDatabaseTableNames( | 63 Response getDatabaseTableNames( |
| 64 ErrorString*, | |
| 65 const String& databaseId, | 64 const String& databaseId, |
| 66 std::unique_ptr<protocol::Array<String>>* names) override; | 65 std::unique_ptr<protocol::Array<String>>* names) override; |
| 67 void executeSQL(const String& databaseId, | 66 void executeSQL(const String& databaseId, |
| 68 const String& query, | 67 const String& query, |
| 69 std::unique_ptr<ExecuteSQLCallback>) override; | 68 std::unique_ptr<ExecuteSQLCallback>) override; |
| 70 | 69 |
| 71 void didOpenDatabase(blink::Database*, | 70 void didOpenDatabase(blink::Database*, |
| 72 const String& domain, | 71 const String& domain, |
| 73 const String& name, | 72 const String& name, |
| 74 const String& version); | 73 const String& version); |
| 75 | 74 |
| 76 private: | 75 private: |
| 77 explicit InspectorDatabaseAgent(Page*); | 76 explicit InspectorDatabaseAgent(Page*); |
| 78 void registerDatabaseOnCreation(blink::Database*); | 77 void registerDatabaseOnCreation(blink::Database*); |
| 79 | 78 |
| 80 blink::Database* databaseForId(const String& databaseId); | 79 blink::Database* databaseForId(const String& databaseId); |
| 81 InspectorDatabaseResource* findByFileName(const String& fileName); | 80 InspectorDatabaseResource* findByFileName(const String& fileName); |
| 82 | 81 |
| 83 Member<Page> m_page; | 82 Member<Page> m_page; |
| 84 typedef HeapHashMap<String, Member<InspectorDatabaseResource>> | 83 typedef HeapHashMap<String, Member<InspectorDatabaseResource>> |
| 85 DatabaseResourcesHeapMap; | 84 DatabaseResourcesHeapMap; |
| 86 DatabaseResourcesHeapMap m_resources; | 85 DatabaseResourcesHeapMap m_resources; |
| 87 bool m_enabled; | 86 bool m_enabled; |
| 88 }; | 87 }; |
| 89 | 88 |
| 90 } // namespace blink | 89 } // namespace blink |
| 91 | 90 |
| 92 #endif // !defined(InspectorDatabaseAgent_h) | 91 #endif // !defined(InspectorDatabaseAgent_h) |
| OLD | NEW |