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 OnVideoMemoryUsageStatsUpdate( |
| 72 const content::GPUVideoMemoryUsageStats& video_memory_usage_stats) |
| 73 OVERRIDE {} |
71 | 74 |
72 // CrashUploadList::Delegate implemenation. | 75 // CrashUploadList::Delegate implemenation. |
73 virtual void OnCrashListAvailable() OVERRIDE; | 76 virtual void OnCrashListAvailable() OVERRIDE; |
74 | 77 |
75 // Messages | 78 // Messages |
76 void OnBrowserBridgeInitialized(const ListValue* list); | 79 void OnBrowserBridgeInitialized(const ListValue* list); |
77 void OnCallAsync(const ListValue* list); | 80 void OnCallAsync(const ListValue* list); |
78 | 81 |
79 // Submessages dispatched from OnCallAsync | 82 // Submessages dispatched from OnCallAsync |
80 Value* OnRequestClientInfo(const ListValue* list); | 83 Value* OnRequestClientInfo(const ListValue* list); |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
296 //////////////////////////////////////////////////////////////////////////////// | 299 //////////////////////////////////////////////////////////////////////////////// |
297 | 300 |
298 GpuInternalsUI::GpuInternalsUI(content::WebUI* web_ui) | 301 GpuInternalsUI::GpuInternalsUI(content::WebUI* web_ui) |
299 : WebUIController(web_ui) { | 302 : WebUIController(web_ui) { |
300 web_ui->AddMessageHandler(new GpuMessageHandler()); | 303 web_ui->AddMessageHandler(new GpuMessageHandler()); |
301 | 304 |
302 // Set up the chrome://gpu-internals/ source. | 305 // Set up the chrome://gpu-internals/ source. |
303 Profile* profile = Profile::FromWebUI(web_ui); | 306 Profile* profile = Profile::FromWebUI(web_ui); |
304 ChromeURLDataManager::AddDataSource(profile, CreateGpuHTMLSource()); | 307 ChromeURLDataManager::AddDataSource(profile, CreateGpuHTMLSource()); |
305 } | 308 } |
OLD | NEW |