Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Unified Diff: components/proximity_auth/webui/proximity_auth_ui.cc

Issue 1080163002: Add new chrome://proximity-auth WebUI for debugging Smart Lock. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixes Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/proximity_auth/webui/proximity_auth_ui.cc
diff --git a/components/proximity_auth/webui/proximity_auth_ui.cc b/components/proximity_auth/webui/proximity_auth_ui.cc
new file mode 100644
index 0000000000000000000000000000000000000000..09a2686d6ae632d52dea9d87082cd53c5ef5f023
--- /dev/null
+++ b/components/proximity_auth/webui/proximity_auth_ui.cc
@@ -0,0 +1,35 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "components/proximity_auth/webui/proximity_auth_ui.h"
+
+#include "components/proximity_auth/webui/proximity_auth_webui_handler.h"
+#include "components/proximity_auth/webui/url_constants.h"
+#include "content/public/browser/browser_context.h"
+#include "content/public/browser/web_contents.h"
+#include "content/public/browser/web_ui.h"
+#include "content/public/browser/web_ui_data_source.h"
+#include "grit/components_resources.h"
+
+namespace proximity_auth {
+
+ProximityAuthUI::ProximityAuthUI(content::WebUI* web_ui)
+ : content::WebUIController(web_ui) {
+ content::WebUIDataSource* source =
+ content::WebUIDataSource::Create(kChromeUIProximityAuthHost);
+ source->SetDefaultResource(IDR_PROXIMITY_AUTH_HTML);
+ source->AddResourcePath("proximity_auth.css", IDR_PROXIMITY_AUTH_CSS);
+ source->AddResourcePath("proximity_auth.js", IDR_PROXIMITY_AUTH_JS);
+ source->SetJsonPath("strings.js");
+
+ content::BrowserContext* browser_context =
+ web_ui->GetWebContents()->GetBrowserContext();
+ content::WebUIDataSource::Add(browser_context, source);
+ web_ui->AddMessageHandler(new ProximityAuthWebUIHandler());
+}
+
+ProximityAuthUI::~ProximityAuthUI() {
+}
+
+} // namespace proximity_auth
« no previous file with comments | « components/proximity_auth/webui/proximity_auth_ui.h ('k') | components/proximity_auth/webui/proximity_auth_webui_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698