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

Side by Side Diff: chrome/browser/ui/webui/about_ui.cc

Issue 9224002: Make WebUI objects not derive from WebUI. WebUI objects own the controller. This is the ownership... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync to head to clear linux_chromeos browsertest failures 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/about_ui.h" 5 #include "chrome/browser/ui/webui/about_ui.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 #include "chrome/common/about_handler.h" 42 #include "chrome/common/about_handler.h"
43 #include "chrome/common/chrome_paths.h" 43 #include "chrome/common/chrome_paths.h"
44 #include "chrome/common/chrome_version_info.h" 44 #include "chrome/common/chrome_version_info.h"
45 #include "chrome/common/jstemplate_builder.h" 45 #include "chrome/common/jstemplate_builder.h"
46 #include "chrome/common/net/gaia/google_service_auth_error.h" 46 #include "chrome/common/net/gaia/google_service_auth_error.h"
47 #include "chrome/common/render_messages.h" 47 #include "chrome/common/render_messages.h"
48 #include "chrome/common/url_constants.h" 48 #include "chrome/common/url_constants.h"
49 #include "content/browser/gpu/gpu_process_host_ui_shim.h" 49 #include "content/browser/gpu/gpu_process_host_ui_shim.h"
50 #include "content/browser/renderer_host/render_view_host.h" 50 #include "content/browser/renderer_host/render_view_host.h"
51 #include "content/browser/sensors/sensors_provider.h" 51 #include "content/browser/sensors/sensors_provider.h"
52 #include "content/browser/webui/web_ui.h"
52 #include "content/public/browser/browser_thread.h" 53 #include "content/public/browser/browser_thread.h"
53 #include "content/public/browser/plugin_service.h" 54 #include "content/public/browser/plugin_service.h"
54 #include "content/public/browser/render_process_host.h" 55 #include "content/public/browser/render_process_host.h"
55 #include "content/public/browser/web_contents.h" 56 #include "content/public/browser/web_contents.h"
56 #include "content/public/common/content_client.h" 57 #include "content/public/common/content_client.h"
57 #include "content/public/common/process_type.h" 58 #include "content/public/common/process_type.h"
58 #include "crypto/nss_util.h" 59 #include "crypto/nss_util.h"
59 #include "googleurl/src/gurl.h" 60 #include "googleurl/src/gurl.h"
60 #include "grit/browser_resources.h" 61 #include "grit/browser_resources.h"
61 #include "grit/chromium_strings.h" 62 #include "grit/chromium_strings.h"
(...skipping 1309 matching lines...) Expand 10 before | Expand all | Expand 10 after
1371 if (path == kCreditsJsPath || 1372 if (path == kCreditsJsPath ||
1372 path == kStatsJsPath || 1373 path == kStatsJsPath ||
1373 path == kStringsJsPath || 1374 path == kStringsJsPath ||
1374 path == kVersionJsPath || 1375 path == kVersionJsPath ||
1375 path == kMemoryJsPath) { 1376 path == kMemoryJsPath) {
1376 return "application/javascript"; 1377 return "application/javascript";
1377 } 1378 }
1378 return "text/html"; 1379 return "text/html";
1379 } 1380 }
1380 1381
1381 AboutUI::AboutUI(WebContents* contents, const std::string& name) 1382 AboutUI::AboutUI(WebUI* web_ui, const std::string& name)
1382 : WebUI(contents, this) { 1383 : WebUIController(web_ui) {
1383 Profile* profile = Profile::FromBrowserContext(contents->GetBrowserContext()); 1384 Profile* profile = Profile::FromBrowserContext(
1385 web_ui->web_contents()->GetBrowserContext());
1384 ChromeURLDataManager::DataSource* source = 1386 ChromeURLDataManager::DataSource* source =
1385 new AboutUIHTMLSource(name, profile); 1387 new AboutUIHTMLSource(name, profile);
1386 if (source) 1388 if (source)
1387 profile->GetChromeURLDataManager()->AddDataSource(source); 1389 profile->GetChromeURLDataManager()->AddDataSource(source);
1388 } 1390 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698