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

Side by Side 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "components/proximity_auth/webui/proximity_auth_ui.h"
6
7 #include "components/proximity_auth/webui/proximity_auth_webui_handler.h"
8 #include "components/proximity_auth/webui/url_constants.h"
9 #include "content/public/browser/browser_context.h"
10 #include "content/public/browser/web_contents.h"
11 #include "content/public/browser/web_ui.h"
12 #include "content/public/browser/web_ui_data_source.h"
13 #include "grit/components_resources.h"
14
15 namespace proximity_auth {
16
17 ProximityAuthUI::ProximityAuthUI(content::WebUI* web_ui)
18 : content::WebUIController(web_ui) {
19 content::WebUIDataSource* source =
20 content::WebUIDataSource::Create(kChromeUIProximityAuthHost);
21 source->SetDefaultResource(IDR_PROXIMITY_AUTH_HTML);
22 source->AddResourcePath("proximity_auth.css", IDR_PROXIMITY_AUTH_CSS);
23 source->AddResourcePath("proximity_auth.js", IDR_PROXIMITY_AUTH_JS);
24 source->SetJsonPath("strings.js");
25
26 content::BrowserContext* browser_context =
27 web_ui->GetWebContents()->GetBrowserContext();
28 content::WebUIDataSource::Add(browser_context, source);
29 web_ui->AddMessageHandler(new ProximityAuthWebUIHandler());
30 }
31
32 ProximityAuthUI::~ProximityAuthUI() {
33 }
34
35 } // namespace proximity_auth
OLDNEW
« 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