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 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 if (InspectorDatabaseResource* resource = | 245 if (InspectorDatabaseResource* resource = |
246 FindByFileName(database->FileName())) { | 246 FindByFileName(database->FileName())) { |
247 resource->SetDatabase(database); | 247 resource->SetDatabase(database); |
248 return; | 248 return; |
249 } | 249 } |
250 | 250 |
251 InspectorDatabaseResource* resource = | 251 InspectorDatabaseResource* resource = |
252 InspectorDatabaseResource::Create(database, domain, name, version); | 252 InspectorDatabaseResource::Create(database, domain, name, version); |
253 resources_.Set(resource->Id(), resource); | 253 resources_.Set(resource->Id(), resource); |
254 // Resources are only bound while visible. | 254 // Resources are only bound while visible. |
255 ASSERT(enabled_ && GetFrontend()); | 255 DCHECK(enabled_); |
| 256 DCHECK(GetFrontend()); |
256 resource->Bind(GetFrontend()); | 257 resource->Bind(GetFrontend()); |
257 } | 258 } |
258 | 259 |
259 void InspectorDatabaseAgent::DidCommitLoadForLocalFrame(LocalFrame* frame) { | 260 void InspectorDatabaseAgent::DidCommitLoadForLocalFrame(LocalFrame* frame) { |
260 // FIXME(dgozman): adapt this for out-of-process iframes. | 261 // FIXME(dgozman): adapt this for out-of-process iframes. |
261 if (frame != page_->MainFrame()) | 262 if (frame != page_->MainFrame()) |
262 return; | 263 return; |
263 | 264 |
264 resources_.Clear(); | 265 resources_.Clear(); |
265 } | 266 } |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
365 return it->value->GetDatabase(); | 366 return it->value->GetDatabase(); |
366 } | 367 } |
367 | 368 |
368 DEFINE_TRACE(InspectorDatabaseAgent) { | 369 DEFINE_TRACE(InspectorDatabaseAgent) { |
369 visitor->Trace(page_); | 370 visitor->Trace(page_); |
370 visitor->Trace(resources_); | 371 visitor->Trace(resources_); |
371 InspectorBaseAgent::Trace(visitor); | 372 InspectorBaseAgent::Trace(visitor); |
372 } | 373 } |
373 | 374 |
374 } // namespace blink | 375 } // namespace blink |
OLD | NEW |