OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "chrome/browser/ui/webui/identity_internals_ui.h" | 5 #include "chrome/browser/ui/webui/identity_internals_ui.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 consumer_->OnTokenRevokerDone(this); | 271 consumer_->OnTokenRevokerDone(this); |
272 } | 272 } |
273 | 273 |
274 } // namespace | 274 } // namespace |
275 | 275 |
276 IdentityInternalsUI::IdentityInternalsUI(content::WebUI* web_ui) | 276 IdentityInternalsUI::IdentityInternalsUI(content::WebUI* web_ui) |
277 : content::WebUIController(web_ui) { | 277 : content::WebUIController(web_ui) { |
278 // chrome://identity-internals source. | 278 // chrome://identity-internals source. |
279 content::WebUIDataSource* html_source = | 279 content::WebUIDataSource* html_source = |
280 content::WebUIDataSource::Create(chrome::kChromeUIIdentityInternalsHost); | 280 content::WebUIDataSource::Create(chrome::kChromeUIIdentityInternalsHost); |
281 html_source->SetUseJsonJSFormatV2(); | |
282 | 281 |
283 // Localized strings | 282 // Localized strings |
284 html_source->AddLocalizedString("tokenCacheHeader", | 283 html_source->AddLocalizedString("tokenCacheHeader", |
285 IDS_IDENTITY_INTERNALS_TOKEN_CACHE_TEXT); | 284 IDS_IDENTITY_INTERNALS_TOKEN_CACHE_TEXT); |
286 html_source->AddLocalizedString("accessToken", | 285 html_source->AddLocalizedString("accessToken", |
287 IDS_IDENTITY_INTERNALS_ACCESS_TOKEN); | 286 IDS_IDENTITY_INTERNALS_ACCESS_TOKEN); |
288 html_source->AddLocalizedString("extensionName", | 287 html_source->AddLocalizedString("extensionName", |
289 IDS_IDENTITY_INTERNALS_EXTENSION_NAME); | 288 IDS_IDENTITY_INTERNALS_EXTENSION_NAME); |
290 html_source->AddLocalizedString("extensionId", | 289 html_source->AddLocalizedString("extensionId", |
291 IDS_IDENTITY_INTERNALS_EXTENSION_ID); | 290 IDS_IDENTITY_INTERNALS_EXTENSION_ID); |
(...skipping 13 matching lines...) Expand all Loading... |
305 html_source->AddResourcePath("identity_internals.js", | 304 html_source->AddResourcePath("identity_internals.js", |
306 IDR_IDENTITY_INTERNALS_JS); | 305 IDR_IDENTITY_INTERNALS_JS); |
307 html_source->SetDefaultResource(IDR_IDENTITY_INTERNALS_HTML); | 306 html_source->SetDefaultResource(IDR_IDENTITY_INTERNALS_HTML); |
308 | 307 |
309 content::WebUIDataSource::Add(Profile::FromWebUI(web_ui), html_source); | 308 content::WebUIDataSource::Add(Profile::FromWebUI(web_ui), html_source); |
310 | 309 |
311 web_ui->AddMessageHandler(new IdentityInternalsUIMessageHandler()); | 310 web_ui->AddMessageHandler(new IdentityInternalsUIMessageHandler()); |
312 } | 311 } |
313 | 312 |
314 IdentityInternalsUI::~IdentityInternalsUI() {} | 313 IdentityInternalsUI::~IdentityInternalsUI() {} |
OLD | NEW |