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

Side by Side Diff: chrome/browser/ui/webui/chromeos/mobile_setup_ui.cc

Issue 9188056: Start splitting out WebUI into an implementation class and an interface that each page implements... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 8 years, 11 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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/chromeos/mobile_setup_ui.h" 5 #include "chrome/browser/ui/webui/chromeos/mobile_setup_ui.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 1368 matching lines...) Expand 10 before | Expand all | Expand 10 after
1379 1379
1380 StartActivation(); 1380 StartActivation();
1381 } 1381 }
1382 1382
1383 //////////////////////////////////////////////////////////////////////////////// 1383 ////////////////////////////////////////////////////////////////////////////////
1384 // 1384 //
1385 // MobileSetupUI 1385 // MobileSetupUI
1386 // 1386 //
1387 //////////////////////////////////////////////////////////////////////////////// 1387 ////////////////////////////////////////////////////////////////////////////////
1388 1388
1389 MobileSetupUI::MobileSetupUI(WebContents* contents) : WebUI(contents) { 1389 MobileSetupUI::MobileSetupUI(WebContents* contents) : WebUI(contents, this) {
1390 chromeos::CellularNetwork* network = GetCellularNetwork(); 1390 chromeos::CellularNetwork* network = GetCellularNetwork();
1391 std::string service_path = network ? network->service_path() : std::string(); 1391 std::string service_path = network ? network->service_path() : std::string();
1392 MobileSetupHandler* handler = new MobileSetupHandler(service_path); 1392 AddMessageHandler(new MobileSetupHandler(service_path));
1393 AddMessageHandler(handler);
1394 MobileSetupUIHTMLSource* html_source = 1393 MobileSetupUIHTMLSource* html_source =
1395 new MobileSetupUIHTMLSource(service_path); 1394 new MobileSetupUIHTMLSource(service_path);
1396 1395
1397 // Set up the chrome://mobilesetup/ source. 1396 // Set up the chrome://mobilesetup/ source.
1398 Profile* profile = Profile::FromBrowserContext(contents->GetBrowserContext()); 1397 Profile* profile = Profile::FromBrowserContext(contents->GetBrowserContext());
1399 profile->GetChromeURLDataManager()->AddDataSource(html_source); 1398 profile->GetChromeURLDataManager()->AddDataSource(html_source);
1400 } 1399 }
1401 1400
1402 void MobileSetupUI::RenderViewCreated(RenderViewHost* host) { 1401 void MobileSetupUI::RenderViewCreated(RenderViewHost* host) {
1403 WebUI::RenderViewCreated(host);
1404 // Destroyed by the corresponding RenderViewHost. 1402 // Destroyed by the corresponding RenderViewHost.
1405 new PortalFrameLoadObserver(host, web_contents()->GetWebUI()); 1403 new PortalFrameLoadObserver(host, web_contents()->GetWebUI());
1406 } 1404 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/chromeos/mobile_setup_ui.h ('k') | chrome/browser/ui/webui/chromeos/proxy_settings_ui.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698