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

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

Issue 23903011: Modify devices page to match the latest mocks (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | Annotate | Revision Log
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 18 matching lines...) Expand all
29 source->AddLocalizedString("registerConfirmMessage", 29 source->AddLocalizedString("registerConfirmMessage",
30 IDS_LOCAL_DISCOVERY_REGISTER_CONFIRMATION); 30 IDS_LOCAL_DISCOVERY_REGISTER_CONFIRMATION);
31 source->AddLocalizedString("registerUser", 31 source->AddLocalizedString("registerUser",
32 IDS_LOCAL_DISCOVERY_REGISTER_USER); 32 IDS_LOCAL_DISCOVERY_REGISTER_USER);
33 source->AddLocalizedString("confirmRegistration", 33 source->AddLocalizedString("confirmRegistration",
34 IDS_LOCAL_DISCOVERY_CONFIRM_REGISTRATION); 34 IDS_LOCAL_DISCOVERY_CONFIRM_REGISTRATION);
35 source->AddLocalizedString("addingPrinter", 35 source->AddLocalizedString("addingPrinter",
36 IDS_LOCAL_DISCOVERY_ADDING_PRINTER); 36 IDS_LOCAL_DISCOVERY_ADDING_PRINTER);
37 source->AddLocalizedString("addingError", 37 source->AddLocalizedString("addingError",
38 IDS_LOCAL_DISCOVERY_ERROR_OCURRED); 38 IDS_LOCAL_DISCOVERY_ERROR_OCURRED);
39 source->AddLocalizedString("addingErrorMessage", 39 source->AddLocalizedString("addingErrorMessage",
Vitaly Buka (NO REVIEWS) 2013/09/06 01:04:53 missaligned
40 IDS_LOCAL_DISCOVERY_ERROR_OCURRED_MESSAGE); 40 IDS_LOCAL_DISCOVERY_ERROR_OCURRED_MESSAGE);
41 source->AddLocalizedString("addingMessage1", 41 source->AddLocalizedString("addingMessage1",
42 IDS_LOCAL_DISCOVERY_ADDING_PRINTER_MESSAGE1); 42 IDS_LOCAL_DISCOVERY_ADDING_PRINTER_MESSAGE1);
43 source->AddLocalizedString("addingMessage2", 43 source->AddLocalizedString("addingMessage2",
44 IDS_LOCAL_DISCOVERY_ADDING_PRINTER_MESSAGE2); 44 IDS_LOCAL_DISCOVERY_ADDING_PRINTER_MESSAGE2);
45 source->AddLocalizedString("registeredDevicesTitle", 45 source->AddLocalizedString("registeredDevicesTitle",
46 IDS_LOCAL_DISCOVERY_REGISTERED_DEVICES_TITLE); 46 IDS_LOCAL_DISCOVERY_REGISTERED_DEVICES_TITLE);
47 source->AddLocalizedString("unregisteredDevicesTitle", 47 source->AddLocalizedString("unregisteredDevicesTitle",
48 IDS_LOCAL_DISCOVERY_UNREGISTERED_DEVICES_TITLE); 48 IDS_LOCAL_DISCOVERY_UNREGISTERED_DEVICES_TITLE);
49 source->AddLocalizedString("devicesTitle", 49 source->AddLocalizedString("devicesTitle",
50 IDS_LOCAL_DISCOVERY_DEVICES_PAGE_TITLE); 50 IDS_LOCAL_DISCOVERY_DEVICES_PAGE_TITLE);
51 source->AddLocalizedString("noDescription",
52 IDS_LOCAL_DISCOVERY_NO_DESCRIPTION);
53 source->AddLocalizedString("printersOnNetworkZero",
54 IDS_LOCAL_DISCOVERY_PRINTERS_ON_NETWORK_ZERO);
55 source->AddLocalizedString("printersOnNetworkOne",
56 IDS_LOCAL_DISCOVERY_PRINTERS_ON_NETWORK_ONE);
57 source->AddLocalizedString("printersOnNetworkMultiple",
58 IDS_LOCAL_DISCOVERY_PRINTERS_ON_NETWORK_MULTIPLE);
59 source->AddLocalizedString("cancel", IDS_CANCEL);
60 source->AddLocalizedString("ok", IDS_OK);
61 source->AddLocalizedString("loading", IDS_LOCAL_DISCOVERY_LOADING);
62 source->AddLocalizedString("addPrinters", IDS_LOCAL_DISCOVERY_ADD_PRINTERS);
63 source->AddLocalizedString(
64 "noPrintersOnNetworkExplanation",
65 IDS_LOCAL_DISCOVERY_NO_PRINTERS_ON_NETWORK_EXPLANATION);
66
51 67
52 source->SetJsonPath("strings.js"); 68 source->SetJsonPath("strings.js");
53 69
54 source->DisableDenyXFrameOptions(); 70 source->DisableDenyXFrameOptions();
55 71
56 return source; 72 return source;
57 } 73 }
58 74
59 } // namespace 75 } // namespace
60 76
61 LocalDiscoveryUI::LocalDiscoveryUI(content::WebUI* web_ui) 77 LocalDiscoveryUI::LocalDiscoveryUI(content::WebUI* web_ui)
62 : WebUIController(web_ui) { 78 : WebUIController(web_ui) {
63 // Set up the chrome://devices/ source. 79 // Set up the chrome://devices/ source.
64 Profile* profile = Profile::FromWebUI(web_ui); 80 Profile* profile = Profile::FromWebUI(web_ui);
65 content::WebUIDataSource::Add(profile, CreateLocalDiscoveryHTMLSource()); 81 content::WebUIDataSource::Add(profile, CreateLocalDiscoveryHTMLSource());
66 82
67 // TODO(gene): Use LocalDiscoveryUIHandler to send updated to the devices 83 // TODO(gene): Use LocalDiscoveryUIHandler to send updated to the devices
68 // page. For example 84 // page. For example
69 web_ui->AddMessageHandler(local_discovery::LocalDiscoveryUIHandler::Create()); 85 web_ui->AddMessageHandler(local_discovery::LocalDiscoveryUIHandler::Create());
70 } 86 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698