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

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

Issue 9003014: Replace WebUI::tab_contents() with web_contents() and switch all users to use web_contents.h inst... (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
« no previous file with comments | « chrome/browser/ui/webui/about_ui.h ('k') | chrome/browser/ui/webui/active_downloads_ui.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/tab_contents/tab_contents.h"
53 #include "content/public/browser/browser_thread.h" 52 #include "content/public/browser/browser_thread.h"
54 #include "content/public/browser/plugin_service.h" 53 #include "content/public/browser/plugin_service.h"
55 #include "content/public/browser/render_process_host.h" 54 #include "content/public/browser/render_process_host.h"
55 #include "content/public/browser/web_contents.h"
56 #include "content/public/common/content_client.h" 56 #include "content/public/common/content_client.h"
57 #include "content/public/common/process_type.h" 57 #include "content/public/common/process_type.h"
58 #include "crypto/nss_util.h" 58 #include "crypto/nss_util.h"
59 #include "googleurl/src/gurl.h" 59 #include "googleurl/src/gurl.h"
60 #include "grit/browser_resources.h" 60 #include "grit/browser_resources.h"
61 #include "grit/chromium_strings.h" 61 #include "grit/chromium_strings.h"
62 #include "grit/generated_resources.h" 62 #include "grit/generated_resources.h"
63 #include "grit/locale_settings.h" 63 #include "grit/locale_settings.h"
64 #include "net/base/escape.h" 64 #include "net/base/escape.h"
65 #include "net/base/net_util.h" 65 #include "net/base/net_util.h"
(...skipping 20 matching lines...) Expand all
86 #endif 86 #endif
87 87
88 #if defined(USE_TCMALLOC) 88 #if defined(USE_TCMALLOC)
89 #include "third_party/tcmalloc/chromium/src/google/malloc_extension.h" 89 #include "third_party/tcmalloc/chromium/src/google/malloc_extension.h"
90 #endif 90 #endif
91 91
92 using base::Time; 92 using base::Time;
93 using base::TimeDelta; 93 using base::TimeDelta;
94 using content::BrowserThread; 94 using content::BrowserThread;
95 using content::PluginService; 95 using content::PluginService;
96 using content::WebContents;
96 97
97 namespace { 98 namespace {
98 99
99 const char kCreditsJsPath[] = "credits.js"; 100 const char kCreditsJsPath[] = "credits.js";
100 const char kMemoryJsPath[] = "memory.js"; 101 const char kMemoryJsPath[] = "memory.js";
101 const char kStatsJsPath[] = "stats.js"; 102 const char kStatsJsPath[] = "stats.js";
102 const char kStringsJsPath[] = "strings.js"; 103 const char kStringsJsPath[] = "strings.js";
103 const char kVersionJsPath[] = "version.js"; 104 const char kVersionJsPath[] = "version.js";
104 105
105 // When you type about:memory, it actually loads this intermediate URL that 106 // When you type about:memory, it actually loads this intermediate URL that
(...skipping 1264 matching lines...) Expand 10 before | Expand all | Expand 10 after
1370 if (path == kCreditsJsPath || 1371 if (path == kCreditsJsPath ||
1371 path == kStatsJsPath || 1372 path == kStatsJsPath ||
1372 path == kStringsJsPath || 1373 path == kStringsJsPath ||
1373 path == kVersionJsPath || 1374 path == kVersionJsPath ||
1374 path == kMemoryJsPath) { 1375 path == kMemoryJsPath) {
1375 return "application/javascript"; 1376 return "application/javascript";
1376 } 1377 }
1377 return "text/html"; 1378 return "text/html";
1378 } 1379 }
1379 1380
1380 AboutUI::AboutUI(TabContents* contents, const std::string& name) 1381 AboutUI::AboutUI(WebContents* contents, const std::string& name)
1381 : ChromeWebUI(contents) { 1382 : ChromeWebUI(contents) {
1382 Profile* profile = Profile::FromBrowserContext(contents->GetBrowserContext()); 1383 Profile* profile = Profile::FromBrowserContext(contents->GetBrowserContext());
1383 ChromeURLDataManager::DataSource* source = 1384 ChromeURLDataManager::DataSource* source =
1384 new AboutUIHTMLSource(name, profile); 1385 new AboutUIHTMLSource(name, profile);
1385 if (source) 1386 if (source)
1386 profile->GetChromeURLDataManager()->AddDataSource(source); 1387 profile->GetChromeURLDataManager()->AddDataSource(source);
1387 } 1388 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/about_ui.h ('k') | chrome/browser/ui/webui/active_downloads_ui.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698