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/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 14 matching lines...) Expand all Loading... |
25 IDR_SYNC_INTERNALS_CHROME_SYNC_JS); | 25 IDR_SYNC_INTERNALS_CHROME_SYNC_JS); |
26 source->AddResourcePath("sync_log.js", IDR_SYNC_INTERNALS_SYNC_LOG_JS); | 26 source->AddResourcePath("sync_log.js", IDR_SYNC_INTERNALS_SYNC_LOG_JS); |
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("search.js", IDR_SYNC_INTERNALS_SEARCH_JS); | 34 source->AddResourcePath("search.js", IDR_SYNC_INTERNALS_SEARCH_JS); |
35 source->AddResourcePath("traffic.js", IDR_SYNC_INTERNALS_TRAFFIC_JS); | |
36 source->SetDefaultResource(IDR_SYNC_INTERNALS_INDEX_HTML); | 35 source->SetDefaultResource(IDR_SYNC_INTERNALS_INDEX_HTML); |
37 return source; | 36 return source; |
38 } | 37 } |
39 | 38 |
40 } // namespace | 39 } // namespace |
41 | 40 |
42 SyncInternalsUI::SyncInternalsUI(content::WebUI* web_ui) | 41 SyncInternalsUI::SyncInternalsUI(content::WebUI* web_ui) |
43 : WebUIController(web_ui) { | 42 : WebUIController(web_ui) { |
44 Profile* profile = Profile::FromWebUI(web_ui); | 43 Profile* profile = Profile::FromWebUI(web_ui); |
45 content::WebUIDataSource::Add(profile, CreateSyncInternalsHTMLSource()); | 44 content::WebUIDataSource::Add(profile, CreateSyncInternalsHTMLSource()); |
46 | 45 |
47 web_ui->AddMessageHandler(new SyncInternalsMessageHandler); | 46 web_ui->AddMessageHandler(new SyncInternalsMessageHandler); |
48 } | 47 } |
49 | 48 |
50 SyncInternalsUI::~SyncInternalsUI() {} | 49 SyncInternalsUI::~SyncInternalsUI() {} |
51 | 50 |
OLD | NEW |