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

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

Issue 8437002: Move BrowserThread to content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: A few updates. Created 9 years, 1 month 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/gpu_internals_ui.h" 5 #include "chrome/browser/ui/webui/gpu_internals_ui.h"
6 6
7 #include <string> 7 #include <string>
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/callback_old.h" 11 #include "base/callback_old.h"
12 #include "base/command_line.h" 12 #include "base/command_line.h"
13 #include "base/string_number_conversions.h" 13 #include "base/string_number_conversions.h"
14 #include "base/stringprintf.h" 14 #include "base/stringprintf.h"
15 #include "base/sys_info.h" 15 #include "base/sys_info.h"
16 #include "base/values.h" 16 #include "base/values.h"
17 #include "chrome/browser/profiles/profile.h" 17 #include "chrome/browser/profiles/profile.h"
18 #include "chrome/browser/ui/webui/chrome_web_ui_data_source.h" 18 #include "chrome/browser/ui/webui/chrome_web_ui_data_source.h"
19 #include "chrome/common/chrome_version_info.h" 19 #include "chrome/common/chrome_version_info.h"
20 #include "chrome/common/url_constants.h" 20 #include "chrome/common/url_constants.h"
21 #include "content/browser/gpu/gpu_data_manager.h" 21 #include "content/browser/gpu/gpu_data_manager.h"
22 #include "content/browser/tab_contents/tab_contents.h" 22 #include "content/browser/tab_contents/tab_contents.h"
23 #include "content/browser/webui/web_ui.h" 23 #include "content/browser/webui/web_ui.h"
24 #include "content/public/browser/browser_thread.h" 24 #include "content/public/browser/browser_thread.h"
25 #include "grit/browser_resources.h" 25 #include "grit/browser_resources.h"
26 #include "grit/generated_resources.h" 26 #include "grit/generated_resources.h"
27 #include "third_party/angle/src/common/version.h" 27 #include "third_party/angle/src/common/version.h"
28 #include "ui/base/l10n/l10n_util.h" 28 #include "ui/base/l10n/l10n_util.h"
29 29
30 using content::BrowserThread;
31
30 namespace { 32 namespace {
31 33
32 ChromeWebUIDataSource* CreateGpuHTMLSource() { 34 ChromeWebUIDataSource* CreateGpuHTMLSource() {
33 ChromeWebUIDataSource* source = 35 ChromeWebUIDataSource* source =
34 new ChromeWebUIDataSource(chrome::kChromeUIGpuInternalsHost); 36 new ChromeWebUIDataSource(chrome::kChromeUIGpuInternalsHost);
35 37
36 source->set_json_path("strings.js"); 38 source->set_json_path("strings.js");
37 source->add_resource_path("gpu_internals.js", IDR_GPU_INTERNALS_JS); 39 source->add_resource_path("gpu_internals.js", IDR_GPU_INTERNALS_JS);
38 source->set_default_resource(IDR_GPU_INTERNALS_HTML); 40 source->set_default_resource(IDR_GPU_INTERNALS_HTML);
39 return source; 41 return source;
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 // 248 //
247 //////////////////////////////////////////////////////////////////////////////// 249 ////////////////////////////////////////////////////////////////////////////////
248 250
249 GpuInternalsUI::GpuInternalsUI(TabContents* contents) : ChromeWebUI(contents) { 251 GpuInternalsUI::GpuInternalsUI(TabContents* contents) : ChromeWebUI(contents) {
250 AddMessageHandler((new GpuMessageHandler())->Attach(this)); 252 AddMessageHandler((new GpuMessageHandler())->Attach(this));
251 253
252 // Set up the chrome://gpu-internals/ source. 254 // Set up the chrome://gpu-internals/ source.
253 Profile* profile = Profile::FromBrowserContext(contents->browser_context()); 255 Profile* profile = Profile::FromBrowserContext(contents->browser_context());
254 profile->GetChromeURLDataManager()->AddDataSource(CreateGpuHTMLSource()); 256 profile->GetChromeURLDataManager()->AddDataSource(CreateGpuHTMLSource());
255 } 257 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/downloads_dom_handler.cc ('k') | chrome/browser/ui/webui/media/media_internals_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698