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

Side by Side Diff: chrome/browser/ui/webui/local_discovery/local_discovery_ui.cc

Issue 20070002: Demo UI for device discovery and registration (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Gate devices page on enable_mdns=1 Created 7 years, 5 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 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/local_discovery/local_discovery_ui.h" 5 #include "chrome/browser/ui/webui/local_discovery/local_discovery_ui.h"
6 6
7 #include "chrome/browser/profiles/profile.h" 7 #include "chrome/browser/profiles/profile.h"
8 #include "chrome/browser/ui/webui/local_discovery/local_discovery_ui_handler.h" 8 #include "chrome/browser/ui/webui/local_discovery/local_discovery_ui_handler.h"
9 #include "chrome/common/url_constants.h" 9 #include "chrome/common/url_constants.h"
10 #include "content/public/browser/web_ui.h" 10 #include "content/public/browser/web_ui.h"
(...skipping 15 matching lines...) Expand all
26 } // namespace 26 } // namespace
27 27
28 LocalDiscoveryUI::LocalDiscoveryUI(content::WebUI* web_ui) 28 LocalDiscoveryUI::LocalDiscoveryUI(content::WebUI* web_ui)
29 : WebUIController(web_ui) { 29 : WebUIController(web_ui) {
30 // Set up the chrome://devices/ source. 30 // Set up the chrome://devices/ source.
31 Profile* profile = Profile::FromWebUI(web_ui); 31 Profile* profile = Profile::FromWebUI(web_ui);
32 content::WebUIDataSource::Add(profile, CreateLocalDiscoveryHTMLSource()); 32 content::WebUIDataSource::Add(profile, CreateLocalDiscoveryHTMLSource());
33 33
34 // TODO(gene): Use LocalDiscoveryUIHandler to send updated to the devices 34 // TODO(gene): Use LocalDiscoveryUIHandler to send updated to the devices
35 // page. For example 35 // page. For example
36 // web_ui->AddMessageHandler(new LocalDiscoveryUIHandler()); 36 web_ui->AddMessageHandler(new local_discovery::LocalDiscoveryUIHandler());
37 } 37 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698