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 typedef String ErrorString; | 47 typedef String ErrorString; |
48 | 48 |
49 class InspectorDatabaseAgent FINAL : public InspectorBaseAgent<InspectorDatabase
Agent>, public InspectorBackendDispatcher::DatabaseCommandHandler { | 49 class InspectorDatabaseAgent FINAL : public InspectorBaseAgent<InspectorDatabase
Agent>, public InspectorBackendDispatcher::DatabaseCommandHandler { |
50 public: | 50 public: |
51 static PassOwnPtr<InspectorDatabaseAgent> create() | 51 static PassOwnPtr<InspectorDatabaseAgent> create() |
52 { | 52 { |
53 return adoptPtr(new InspectorDatabaseAgent()); | 53 return adoptPtr(new InspectorDatabaseAgent()); |
54 } | 54 } |
55 virtual ~InspectorDatabaseAgent(); | 55 virtual ~InspectorDatabaseAgent(); |
56 | 56 |
57 virtual void init() OVERRIDE; | |
58 virtual void setFrontend(InspectorFrontend*) OVERRIDE; | 57 virtual void setFrontend(InspectorFrontend*) OVERRIDE; |
59 virtual void clearFrontend() OVERRIDE; | 58 virtual void clearFrontend() OVERRIDE; |
60 virtual void restore() OVERRIDE; | 59 virtual void restore() OVERRIDE; |
61 | 60 |
62 void didCommitLoad(Frame*, DocumentLoader*); | 61 void didCommitLoad(Frame*, DocumentLoader*); |
63 | 62 |
64 // Called from the front-end. | 63 // Called from the front-end. |
65 virtual void enable(ErrorString*) OVERRIDE; | 64 virtual void enable(ErrorString*) OVERRIDE; |
66 virtual void disable(ErrorString*) OVERRIDE; | 65 virtual void disable(ErrorString*) OVERRIDE; |
67 virtual void getDatabaseTableNames(ErrorString*, const String& databaseId, R
efPtr<TypeBuilder::Array<String> >& names) OVERRIDE; | 66 virtual void getDatabaseTableNames(ErrorString*, const String& databaseId, R
efPtr<TypeBuilder::Array<String> >& names) OVERRIDE; |
68 virtual void executeSQL(ErrorString*, const String& databaseId, const String
& query, PassRefPtr<ExecuteSQLCallback>) OVERRIDE; | 67 virtual void executeSQL(ErrorString*, const String& databaseId, const String
& query, PassRefPtr<ExecuteSQLCallback>) OVERRIDE; |
69 | 68 |
70 void didOpenDatabase(PassRefPtr<Database>, const String& domain, const Strin
g& name, const String& version); | 69 void didOpenDatabase(PassRefPtr<Database>, const String& domain, const Strin
g& name, const String& version); |
71 private: | 70 private: |
72 explicit InspectorDatabaseAgent(); | 71 explicit InspectorDatabaseAgent(); |
73 | 72 |
74 Database* databaseForId(const String& databaseId); | 73 Database* databaseForId(const String& databaseId); |
75 InspectorDatabaseResource* findByFileName(const String& fileName); | 74 InspectorDatabaseResource* findByFileName(const String& fileName); |
76 | 75 |
77 InspectorFrontend::Database* m_frontend; | 76 InspectorFrontend::Database* m_frontend; |
78 typedef HashMap<String, RefPtr<InspectorDatabaseResource> > DatabaseResource
sMap; | 77 typedef HashMap<String, RefPtr<InspectorDatabaseResource> > DatabaseResource
sMap; |
79 DatabaseResourcesMap m_resources; | 78 DatabaseResourcesMap m_resources; |
80 bool m_enabled; | 79 bool m_enabled; |
81 }; | 80 }; |
82 | 81 |
83 } // namespace WebCore | 82 } // namespace WebCore |
84 | 83 |
85 #endif // !defined(InspectorDatabaseAgent_h) | 84 #endif // !defined(InspectorDatabaseAgent_h) |
OLD | NEW |