| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/browser/indexed_db/indexed_db_internals_ui.h" | 5 #include "content/browser/indexed_db/indexed_db_internals_ui.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 base::Unretained(this))); | 61 base::Unretained(this))); |
| 62 | 62 |
| 63 WebUIDataSource* source = | 63 WebUIDataSource* source = |
| 64 WebUIDataSource::Create(kChromeUIIndexedDBInternalsHost); | 64 WebUIDataSource::Create(kChromeUIIndexedDBInternalsHost); |
| 65 source->SetJsonPath("strings.js"); | 65 source->SetJsonPath("strings.js"); |
| 66 source->AddResourcePath("indexeddb_internals.js", | 66 source->AddResourcePath("indexeddb_internals.js", |
| 67 IDR_INDEXED_DB_INTERNALS_JS); | 67 IDR_INDEXED_DB_INTERNALS_JS); |
| 68 source->AddResourcePath("indexeddb_internals.css", | 68 source->AddResourcePath("indexeddb_internals.css", |
| 69 IDR_INDEXED_DB_INTERNALS_CSS); | 69 IDR_INDEXED_DB_INTERNALS_CSS); |
| 70 source->SetDefaultResource(IDR_INDEXED_DB_INTERNALS_HTML); | 70 source->SetDefaultResource(IDR_INDEXED_DB_INTERNALS_HTML); |
| 71 source->DisableI18nAndUseGzipForAllPaths(); | 71 source->UseGzipForAllPaths(); |
| 72 | 72 |
| 73 BrowserContext* browser_context = | 73 BrowserContext* browser_context = |
| 74 web_ui->GetWebContents()->GetBrowserContext(); | 74 web_ui->GetWebContents()->GetBrowserContext(); |
| 75 WebUIDataSource::Add(browser_context, source); | 75 WebUIDataSource::Add(browser_context, source); |
| 76 } | 76 } |
| 77 | 77 |
| 78 IndexedDBInternalsUI::~IndexedDBInternalsUI() {} | 78 IndexedDBInternalsUI::~IndexedDBInternalsUI() {} |
| 79 | 79 |
| 80 void IndexedDBInternalsUI::AddContextFromStoragePartition( | 80 void IndexedDBInternalsUI::AddContextFromStoragePartition( |
| 81 StoragePartition* partition) { | 81 StoragePartition* partition) { |
| (...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 358 | 358 |
| 359 item->AddObserver(new FileDeleter(temp_path)); | 359 item->AddObserver(new FileDeleter(temp_path)); |
| 360 web_ui()->CallJavascriptFunctionUnsafe( | 360 web_ui()->CallJavascriptFunctionUnsafe( |
| 361 "indexeddb.onOriginDownloadReady", | 361 "indexeddb.onOriginDownloadReady", |
| 362 base::StringValue(partition_path.value()), | 362 base::StringValue(partition_path.value()), |
| 363 base::StringValue(origin.Serialize()), | 363 base::StringValue(origin.Serialize()), |
| 364 base::FundamentalValue(static_cast<double>(connection_count))); | 364 base::FundamentalValue(static_cast<double>(connection_count))); |
| 365 } | 365 } |
| 366 | 366 |
| 367 } // namespace content | 367 } // namespace content |
| OLD | NEW |