OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/sync_internals_ui.h" | 5 #include "chrome/browser/ui/webui/sync_internals_ui.h" |
6 | 6 |
7 #include "chrome/browser/profiles/profile.h" | 7 #include "chrome/browser/profiles/profile.h" |
8 #include "chrome/browser/ui/webui/sync_internals_message_handler.h" | 8 #include "chrome/browser/ui/webui/sync_internals_message_handler.h" |
9 #include "chrome/common/extensions/extension_messages.h" | 9 #include "chrome/common/extensions/extension_messages.h" |
10 #include "chrome/common/url_constants.h" | 10 #include "chrome/common/url_constants.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 source->AddResourcePath("sync_node_browser.js", | 27 source->AddResourcePath("sync_node_browser.js", |
28 IDR_SYNC_INTERNALS_SYNC_NODE_BROWSER_JS); | 28 IDR_SYNC_INTERNALS_SYNC_NODE_BROWSER_JS); |
29 source->AddResourcePath("sync_search.js", | 29 source->AddResourcePath("sync_search.js", |
30 IDR_SYNC_INTERNALS_SYNC_SEARCH_JS); | 30 IDR_SYNC_INTERNALS_SYNC_SEARCH_JS); |
31 source->AddResourcePath("about.js", IDR_SYNC_INTERNALS_ABOUT_JS); | 31 source->AddResourcePath("about.js", IDR_SYNC_INTERNALS_ABOUT_JS); |
32 source->AddResourcePath("data.js", IDR_SYNC_INTERNALS_DATA_JS); | 32 source->AddResourcePath("data.js", IDR_SYNC_INTERNALS_DATA_JS); |
33 source->AddResourcePath("events.js", IDR_SYNC_INTERNALS_EVENTS_JS); | 33 source->AddResourcePath("events.js", IDR_SYNC_INTERNALS_EVENTS_JS); |
34 source->AddResourcePath("notifications.js", | 34 source->AddResourcePath("notifications.js", |
35 IDR_SYNC_INTERNALS_NOTIFICATIONS_JS); | 35 IDR_SYNC_INTERNALS_NOTIFICATIONS_JS); |
36 source->AddResourcePath("search.js", IDR_SYNC_INTERNALS_SEARCH_JS); | 36 source->AddResourcePath("search.js", IDR_SYNC_INTERNALS_SEARCH_JS); |
37 source->AddResourcePath("node_browser.js", | |
38 IDR_SYNC_INTERNALS_NODE_BROWSER_JS); | |
39 source->AddResourcePath("traffic.js", IDR_SYNC_INTERNALS_TRAFFIC_JS); | 37 source->AddResourcePath("traffic.js", IDR_SYNC_INTERNALS_TRAFFIC_JS); |
40 source->SetDefaultResource(IDR_SYNC_INTERNALS_INDEX_HTML); | 38 source->SetDefaultResource(IDR_SYNC_INTERNALS_INDEX_HTML); |
41 return source; | 39 return source; |
42 } | 40 } |
43 | 41 |
44 } // namespace | 42 } // namespace |
45 | 43 |
46 SyncInternalsUI::SyncInternalsUI(content::WebUI* web_ui) | 44 SyncInternalsUI::SyncInternalsUI(content::WebUI* web_ui) |
47 : WebUIController(web_ui) { | 45 : WebUIController(web_ui) { |
48 Profile* profile = Profile::FromWebUI(web_ui); | 46 Profile* profile = Profile::FromWebUI(web_ui); |
49 content::WebUIDataSource::Add(profile, CreateSyncInternalsHTMLSource()); | 47 content::WebUIDataSource::Add(profile, CreateSyncInternalsHTMLSource()); |
50 | 48 |
51 web_ui->AddMessageHandler(new SyncInternalsMessageHandler); | 49 web_ui->AddMessageHandler(new SyncInternalsMessageHandler); |
52 } | 50 } |
53 | 51 |
54 SyncInternalsUI::~SyncInternalsUI() {} | 52 SyncInternalsUI::~SyncInternalsUI() {} |
55 | 53 |
OLD | NEW |