| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. |
| 3 * Copyright (C) 2011 Google, Inc. All Rights Reserved. | 3 * Copyright (C) 2011 Google, Inc. 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 | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 public: | 45 public: |
| 46 friend class DatabaseManager; | 46 friend class DatabaseManager; |
| 47 | 47 |
| 48 static DatabaseContext* create(ExecutionContext*); | 48 static DatabaseContext* create(ExecutionContext*); |
| 49 | 49 |
| 50 ~DatabaseContext() override; | 50 ~DatabaseContext() override; |
| 51 DECLARE_VIRTUAL_TRACE(); | 51 DECLARE_VIRTUAL_TRACE(); |
| 52 | 52 |
| 53 // For life-cycle management (inherited from ActiveDOMObject): | 53 // For life-cycle management (inherited from ActiveDOMObject): |
| 54 void contextDestroyed() override; | 54 void contextDestroyed() override; |
| 55 void stop() override; | |
| 56 | 55 |
| 57 DatabaseContext* backend(); | 56 DatabaseContext* backend(); |
| 58 DatabaseThread* databaseThread(); | 57 DatabaseThread* databaseThread(); |
| 59 bool databaseThreadAvailable(); | 58 bool databaseThreadAvailable(); |
| 60 | 59 |
| 61 void setHasOpenDatabases() { m_hasOpenDatabases = true; } | 60 void setHasOpenDatabases() { m_hasOpenDatabases = true; } |
| 62 // Blocks the caller thread until cleanup tasks are completed. | 61 // Blocks the caller thread until cleanup tasks are completed. |
| 63 void stopDatabases(); | 62 void stopDatabases(); |
| 64 | 63 |
| 65 bool allowDatabaseAccess() const; | 64 bool allowDatabaseAccess() const; |
| 66 | 65 |
| 67 SecurityOrigin* getSecurityOrigin() const; | 66 SecurityOrigin* getSecurityOrigin() const; |
| 68 bool isContextThread() const; | 67 bool isContextThread() const; |
| 69 | 68 |
| 70 private: | 69 private: |
| 71 explicit DatabaseContext(ExecutionContext*); | 70 explicit DatabaseContext(ExecutionContext*); |
| 72 | 71 |
| 73 Member<DatabaseThread> m_databaseThread; | 72 Member<DatabaseThread> m_databaseThread; |
| 74 bool | 73 bool |
| 75 m_hasOpenDatabases; // This never changes back to false, even after the d
atabase thread is closed. | 74 m_hasOpenDatabases; // This never changes back to false, even after the d
atabase thread is closed. |
| 76 bool m_hasRequestedTermination; | 75 bool m_hasRequestedTermination; |
| 77 }; | 76 }; |
| 78 | 77 |
| 79 } // namespace blink | 78 } // namespace blink |
| 80 | 79 |
| 81 #endif // DatabaseContext_h | 80 #endif // DatabaseContext_h |
| OLD | NEW |