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

Side by Side Diff: components/proximity_auth/webui/proximity_auth_ui.cc

Issue 1302313004: Replace ProximityAuthUIDelegate with ProximityAuthClient. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@proximity_auth_client
Patch Set: fixes Created 5 years, 3 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
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 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 "components/proximity_auth/webui/proximity_auth_ui.h" 5 #include "components/proximity_auth/webui/proximity_auth_ui.h"
6 6
7 #include "components/proximity_auth/webui/proximity_auth_webui_handler.h" 7 #include "components/proximity_auth/webui/proximity_auth_webui_handler.h"
8 #include "components/proximity_auth/webui/url_constants.h" 8 #include "components/proximity_auth/webui/url_constants.h"
9 #include "content/public/browser/browser_context.h" 9 #include "content/public/browser/browser_context.h"
10 #include "content/public/browser/web_contents.h" 10 #include "content/public/browser/web_contents.h"
11 #include "content/public/browser/web_ui.h" 11 #include "content/public/browser/web_ui.h"
12 #include "content/public/browser/web_ui_data_source.h" 12 #include "content/public/browser/web_ui_data_source.h"
13 #include "grit/components_resources.h" 13 #include "grit/components_resources.h"
14 #include "grit/webui_resources.h" 14 #include "grit/webui_resources.h"
15 15
16 namespace proximity_auth { 16 namespace proximity_auth {
17 17
18 ProximityAuthUI::ProximityAuthUI(content::WebUI* web_ui, 18 ProximityAuthUI::ProximityAuthUI(content::WebUI* web_ui,
19 ProximityAuthUIDelegate* delegate) 19 ProximityAuthClient* delegate)
20 : content::WebUIController(web_ui) { 20 : content::WebUIController(web_ui) {
21 content::WebUIDataSource* source = 21 content::WebUIDataSource* source =
22 content::WebUIDataSource::Create(kChromeUIProximityAuthHost); 22 content::WebUIDataSource::Create(kChromeUIProximityAuthHost);
23 source->SetDefaultResource(IDR_PROXIMITY_AUTH_UI_HTML); 23 source->SetDefaultResource(IDR_PROXIMITY_AUTH_UI_HTML);
24 source->AddResourcePath("proximity_auth.css", IDR_PROXIMITY_AUTH_UI_CSS); 24 source->AddResourcePath("proximity_auth.css", IDR_PROXIMITY_AUTH_UI_CSS);
25 source->AddResourcePath("content-panel.html", 25 source->AddResourcePath("content-panel.html",
26 IDR_PROXIMITY_AUTH_CONTENT_PANEL_HTML); 26 IDR_PROXIMITY_AUTH_CONTENT_PANEL_HTML);
27 source->AddResourcePath("content-panel.js", 27 source->AddResourcePath("content-panel.js",
28 IDR_PROXIMITY_AUTH_CONTENT_PANEL_JS); 28 IDR_PROXIMITY_AUTH_CONTENT_PANEL_JS);
29 source->AddResourcePath("log-panel.html", IDR_PROXIMITY_AUTH_LOG_PANEL_HTML); 29 source->AddResourcePath("log-panel.html", IDR_PROXIMITY_AUTH_LOG_PANEL_HTML);
(...skipping 21 matching lines...) Expand all
51 content::BrowserContext* browser_context = 51 content::BrowserContext* browser_context =
52 web_ui->GetWebContents()->GetBrowserContext(); 52 web_ui->GetWebContents()->GetBrowserContext();
53 content::WebUIDataSource::Add(browser_context, source); 53 content::WebUIDataSource::Add(browser_context, source);
54 web_ui->AddMessageHandler(new ProximityAuthWebUIHandler(delegate)); 54 web_ui->AddMessageHandler(new ProximityAuthWebUIHandler(delegate));
55 } 55 }
56 56
57 ProximityAuthUI::~ProximityAuthUI() { 57 ProximityAuthUI::~ProximityAuthUI() {
58 } 58 }
59 59
60 } // namespace proximity_auth 60 } // namespace proximity_auth
OLDNEW
« no previous file with comments | « components/proximity_auth/webui/proximity_auth_ui.h ('k') | components/proximity_auth/webui/proximity_auth_ui_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698