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