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

Side by Side Diff: chrome/browser/ui/webui/gpu_internals_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) 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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698