| 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 public CrashUploadList::Delegate { | 61 public CrashUploadList::Delegate { |
| 62 public: | 62 public: |
| 63 GpuMessageHandler(); | 63 GpuMessageHandler(); |
| 64 virtual ~GpuMessageHandler(); | 64 virtual ~GpuMessageHandler(); |
| 65 | 65 |
| 66 // WebUIMessageHandler implementation. | 66 // WebUIMessageHandler implementation. |
| 67 virtual void RegisterMessages() OVERRIDE; | 67 virtual void RegisterMessages() OVERRIDE; |
| 68 | 68 |
| 69 // GpuDataManagerObserver implementation. | 69 // GpuDataManagerObserver implementation. |
| 70 virtual void OnGpuInfoUpdate() OVERRIDE; | 70 virtual void OnGpuInfoUpdate() OVERRIDE; |
| 71 virtual void OnVidmemUpdate(const content::GPUVidmem& vidmem) OVERRIDE {} |
| 71 | 72 |
| 72 // CrashUploadList::Delegate implemenation. | 73 // CrashUploadList::Delegate implemenation. |
| 73 virtual void OnCrashListAvailable() OVERRIDE; | 74 virtual void OnCrashListAvailable() OVERRIDE; |
| 74 | 75 |
| 75 // Messages | 76 // Messages |
| 76 void OnBrowserBridgeInitialized(const ListValue* list); | 77 void OnBrowserBridgeInitialized(const ListValue* list); |
| 77 void OnCallAsync(const ListValue* list); | 78 void OnCallAsync(const ListValue* list); |
| 78 | 79 |
| 79 // Submessages dispatched from OnCallAsync | 80 // Submessages dispatched from OnCallAsync |
| 80 Value* OnRequestClientInfo(const ListValue* list); | 81 Value* OnRequestClientInfo(const ListValue* list); |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 //////////////////////////////////////////////////////////////////////////////// | 297 //////////////////////////////////////////////////////////////////////////////// |
| 297 | 298 |
| 298 GpuInternalsUI::GpuInternalsUI(content::WebUI* web_ui) | 299 GpuInternalsUI::GpuInternalsUI(content::WebUI* web_ui) |
| 299 : WebUIController(web_ui) { | 300 : WebUIController(web_ui) { |
| 300 web_ui->AddMessageHandler(new GpuMessageHandler()); | 301 web_ui->AddMessageHandler(new GpuMessageHandler()); |
| 301 | 302 |
| 302 // Set up the chrome://gpu-internals/ source. | 303 // Set up the chrome://gpu-internals/ source. |
| 303 Profile* profile = Profile::FromWebUI(web_ui); | 304 Profile* profile = Profile::FromWebUI(web_ui); |
| 304 ChromeURLDataManager::AddDataSource(profile, CreateGpuHTMLSource()); | 305 ChromeURLDataManager::AddDataSource(profile, CreateGpuHTMLSource()); |
| 305 } | 306 } |
| OLD | NEW |