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

Side by Side Diff: ios/chrome/browser/ui/webui/gcm/gcm_internals_ui.cc

Issue 2116673002: [ios] Moved WebUI provider code to ios/web. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Self review Created 4 years, 5 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/gcm/gcm_internals_ui.h" 5 #include "ios/chrome/browser/ui/webui/gcm/gcm_internals_ui.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/memory/weak_ptr.h" 12 #include "base/memory/weak_ptr.h"
13 #include "base/values.h" 13 #include "base/values.h"
14 #include "components/gcm_driver/gcm_client.h" 14 #include "components/gcm_driver/gcm_client.h"
15 #include "components/gcm_driver/gcm_driver.h" 15 #include "components/gcm_driver/gcm_driver.h"
16 #include "components/gcm_driver/gcm_internals_constants.h" 16 #include "components/gcm_driver/gcm_internals_constants.h"
17 #include "components/gcm_driver/gcm_internals_helper.h" 17 #include "components/gcm_driver/gcm_internals_helper.h"
18 #include "components/gcm_driver/gcm_profile_service.h" 18 #include "components/gcm_driver/gcm_profile_service.h"
19 #include "components/grit/components_resources.h" 19 #include "components/grit/components_resources.h"
20 #include "ios/chrome/browser/browser_state/chrome_browser_state.h" 20 #include "ios/chrome/browser/browser_state/chrome_browser_state.h"
21 #include "ios/chrome/browser/chrome_url_constants.h" 21 #include "ios/chrome/browser/chrome_url_constants.h"
22 #include "ios/chrome/browser/services/gcm/ios_chrome_gcm_profile_service_factory .h" 22 #include "ios/chrome/browser/services/gcm/ios_chrome_gcm_profile_service_factory .h"
23 #include "ios/public/provider/web/web_ui_ios.h"
24 #include "ios/public/provider/web/web_ui_ios_message_handler.h"
25 #include "ios/web/public/web_ui_ios_data_source.h" 23 #include "ios/web/public/web_ui_ios_data_source.h"
24 #include "ios/web/public/webui/web_ui_ios.h"
25 #include "ios/web/public/webui/web_ui_ios_message_handler.h"
26 26
27 namespace { 27 namespace {
28 28
29 // Class acting as a controller of the chrome://gcm-internals WebUI. 29 // Class acting as a controller of the chrome://gcm-internals WebUI.
30 class GcmInternalsUIMessageHandler : public web::WebUIIOSMessageHandler { 30 class GcmInternalsUIMessageHandler : public web::WebUIIOSMessageHandler {
31 public: 31 public:
32 GcmInternalsUIMessageHandler(); 32 GcmInternalsUIMessageHandler();
33 ~GcmInternalsUIMessageHandler() override; 33 ~GcmInternalsUIMessageHandler() override;
34 34
35 // WebUIMessageHandler implementation. 35 // WebUIMessageHandler implementation.
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 IDR_GCM_DRIVER_GCM_INTERNALS_JS); 168 IDR_GCM_DRIVER_GCM_INTERNALS_JS);
169 html_source->SetDefaultResource(IDR_GCM_DRIVER_GCM_INTERNALS_HTML); 169 html_source->SetDefaultResource(IDR_GCM_DRIVER_GCM_INTERNALS_HTML);
170 170
171 web::WebUIIOSDataSource::Add(ios::ChromeBrowserState::FromWebUIIOS(web_ui), 171 web::WebUIIOSDataSource::Add(ios::ChromeBrowserState::FromWebUIIOS(web_ui),
172 html_source); 172 html_source);
173 173
174 web_ui->AddMessageHandler(new GcmInternalsUIMessageHandler()); 174 web_ui->AddMessageHandler(new GcmInternalsUIMessageHandler());
175 } 175 }
176 176
177 GCMInternalsUI::~GCMInternalsUI() {} 177 GCMInternalsUI::~GCMInternalsUI() {}
OLDNEW
« no previous file with comments | « ios/chrome/browser/ui/webui/gcm/gcm_internals_ui.h ('k') | ios/chrome/browser/ui/webui/history/browsing_history_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698