| 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 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 } | 257 } |
| 258 | 258 |
| 259 void InspectorDatabaseAgent::enable(ErrorString*) | 259 void InspectorDatabaseAgent::enable(ErrorString*) |
| 260 { | 260 { |
| 261 if (m_enabled) | 261 if (m_enabled) |
| 262 return; | 262 return; |
| 263 m_enabled = true; | 263 m_enabled = true; |
| 264 m_state->setBoolean(DatabaseAgentState::databaseAgentEnabled, m_enabled); | 264 m_state->setBoolean(DatabaseAgentState::databaseAgentEnabled, m_enabled); |
| 265 if (DatabaseClient* client = DatabaseClient::fromPage(m_page)) | 265 if (DatabaseClient* client = DatabaseClient::fromPage(m_page)) |
| 266 client->setInspectorAgent(this); | 266 client->setInspectorAgent(this); |
| 267 DatabaseTracker::tracker().forEachOpenDatabaseInPage(m_page, bind(&Inspector
DatabaseAgent::registerDatabaseOnCreation, wrapPersistent(this))); | 267 DatabaseTracker::tracker().forEachOpenDatabaseInPage(m_page, WTF::bind(&Insp
ectorDatabaseAgent::registerDatabaseOnCreation, wrapPersistent(this))); |
| 268 } | 268 } |
| 269 | 269 |
| 270 void InspectorDatabaseAgent::disable(ErrorString*) | 270 void InspectorDatabaseAgent::disable(ErrorString*) |
| 271 { | 271 { |
| 272 if (!m_enabled) | 272 if (!m_enabled) |
| 273 return; | 273 return; |
| 274 m_enabled = false; | 274 m_enabled = false; |
| 275 m_state->setBoolean(DatabaseAgentState::databaseAgentEnabled, m_enabled); | 275 m_state->setBoolean(DatabaseAgentState::databaseAgentEnabled, m_enabled); |
| 276 if (DatabaseClient* client = DatabaseClient::fromPage(m_page)) | 276 if (DatabaseClient* client = DatabaseClient::fromPage(m_page)) |
| 277 client->setInspectorAgent(nullptr); | 277 client->setInspectorAgent(nullptr); |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 344 } | 344 } |
| 345 | 345 |
| 346 DEFINE_TRACE(InspectorDatabaseAgent) | 346 DEFINE_TRACE(InspectorDatabaseAgent) |
| 347 { | 347 { |
| 348 visitor->trace(m_page); | 348 visitor->trace(m_page); |
| 349 visitor->trace(m_resources); | 349 visitor->trace(m_resources); |
| 350 InspectorBaseAgent::trace(visitor); | 350 InspectorBaseAgent::trace(visitor); |
| 351 } | 351 } |
| 352 | 352 |
| 353 } // namespace blink | 353 } // namespace blink |
| OLD | NEW |