OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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" |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 | 236 |
237 } // namespace | 237 } // namespace |
238 | 238 |
239 | 239 |
240 //////////////////////////////////////////////////////////////////////////////// | 240 //////////////////////////////////////////////////////////////////////////////// |
241 // | 241 // |
242 // GpuInternalsUI | 242 // GpuInternalsUI |
243 // | 243 // |
244 //////////////////////////////////////////////////////////////////////////////// | 244 //////////////////////////////////////////////////////////////////////////////// |
245 | 245 |
246 GpuInternalsUI::GpuInternalsUI(WebContents* contents) : WebUI(contents, this) { | 246 GpuInternalsUI::GpuInternalsUI(WebUI* web_ui) : WebUIController(web_ui) { |
247 AddMessageHandler(new GpuMessageHandler()); | 247 web_ui->AddMessageHandler(new GpuMessageHandler()); |
248 | 248 |
249 // Set up the chrome://gpu-internals/ source. | 249 // Set up the chrome://gpu-internals/ source. |
250 Profile* profile = Profile::FromBrowserContext(contents->GetBrowserContext()); | 250 Profile* profile = Profile::FromBrowserContext( |
| 251 web_ui->web_contents()->GetBrowserContext()); |
251 profile->GetChromeURLDataManager()->AddDataSource(CreateGpuHTMLSource()); | 252 profile->GetChromeURLDataManager()->AddDataSource(CreateGpuHTMLSource()); |
252 } | 253 } |
OLD | NEW |