| OLD | NEW | 
|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "ios/chrome/browser/ui/webui/ntp_tiles_internals_ui.h" | 5 #include "ios/chrome/browser/ui/webui/ntp_tiles_internals_ui.h" | 
| 6 | 6 | 
|  | 7 #include "base/memory/ptr_util.h" | 
| 7 #include "components/grit/components_resources.h" | 8 #include "components/grit/components_resources.h" | 
| 8 #include "components/ntp_tiles/field_trial.h" | 9 #include "components/ntp_tiles/field_trial.h" | 
| 9 #include "components/ntp_tiles/most_visited_sites.h" | 10 #include "components/ntp_tiles/most_visited_sites.h" | 
| 10 #include "components/ntp_tiles/popular_sites.h" | 11 #include "components/ntp_tiles/popular_sites.h" | 
| 11 #include "components/ntp_tiles/webui/ntp_tiles_internals_message_handler.h" | 12 #include "components/ntp_tiles/webui/ntp_tiles_internals_message_handler.h" | 
| 12 #include "components/ntp_tiles/webui/ntp_tiles_internals_message_handler_client.
     h" | 13 #include "components/ntp_tiles/webui/ntp_tiles_internals_message_handler_client.
     h" | 
| 13 #include "ios/chrome/browser/browser_state/chrome_browser_state.h" | 14 #include "ios/chrome/browser/browser_state/chrome_browser_state.h" | 
| 14 #include "ios/chrome/browser/chrome_url_constants.h" | 15 #include "ios/chrome/browser/chrome_url_constants.h" | 
| 15 #include "ios/chrome/browser/ntp_tiles/ios_most_visited_sites_factory.h" | 16 #include "ios/chrome/browser/ntp_tiles/ios_most_visited_sites_factory.h" | 
| 16 #include "ios/chrome/browser/ntp_tiles/ios_popular_sites_factory.h" | 17 #include "ios/chrome/browser/ntp_tiles/ios_popular_sites_factory.h" | 
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 105   source->AddResourcePath("ntp_tiles_internals.css", | 106   source->AddResourcePath("ntp_tiles_internals.css", | 
| 106                           IDR_NTP_TILES_INTERNALS_CSS); | 107                           IDR_NTP_TILES_INTERNALS_CSS); | 
| 107   source->SetDefaultResource(IDR_NTP_TILES_INTERNALS_HTML); | 108   source->SetDefaultResource(IDR_NTP_TILES_INTERNALS_HTML); | 
| 108   return source; | 109   return source; | 
| 109 } | 110 } | 
| 110 | 111 | 
| 111 NTPTilesInternalsUI::NTPTilesInternalsUI(web::WebUIIOS* web_ui) | 112 NTPTilesInternalsUI::NTPTilesInternalsUI(web::WebUIIOS* web_ui) | 
| 112     : web::WebUIIOSController(web_ui) { | 113     : web::WebUIIOSController(web_ui) { | 
| 113   web::WebUIIOSDataSource::Add(ios::ChromeBrowserState::FromWebUIIOS(web_ui), | 114   web::WebUIIOSDataSource::Add(ios::ChromeBrowserState::FromWebUIIOS(web_ui), | 
| 114                                CreateNTPTilesInternalsHTMLSource()); | 115                                CreateNTPTilesInternalsHTMLSource()); | 
| 115   web_ui->AddMessageHandler(new IOSNTPTilesInternalsMessageHandlerBridge); | 116   web_ui->AddMessageHandler( | 
|  | 117       base::MakeUnique<IOSNTPTilesInternalsMessageHandlerBridge>()); | 
| 116 } | 118 } | 
| 117 | 119 | 
| 118 NTPTilesInternalsUI::~NTPTilesInternalsUI() {} | 120 NTPTilesInternalsUI::~NTPTilesInternalsUI() {} | 
| OLD | NEW | 
|---|