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/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 Loading... |
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 } |
OLD | NEW |