| 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 "content/browser/gpu/gpu_internals_ui.h" | 5 #include "content/browser/gpu/gpu_internals_ui.h" |
| 6 | 6 |
| 7 #if defined(OS_LINUX) && defined(USE_X11) | 7 #if defined(OS_LINUX) && defined(USE_X11) |
| 8 #include <X11/Xlib.h> | 8 #include <X11/Xlib.h> |
| 9 #endif | 9 #endif |
| 10 | 10 |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 // this class's methods are expected to run on the UI thread. | 238 // this class's methods are expected to run on the UI thread. |
| 239 class GpuMessageHandler | 239 class GpuMessageHandler |
| 240 : public WebUIMessageHandler, | 240 : public WebUIMessageHandler, |
| 241 public base::SupportsWeakPtr<GpuMessageHandler>, | 241 public base::SupportsWeakPtr<GpuMessageHandler>, |
| 242 public GpuDataManagerObserver { | 242 public GpuDataManagerObserver { |
| 243 public: | 243 public: |
| 244 GpuMessageHandler(); | 244 GpuMessageHandler(); |
| 245 virtual ~GpuMessageHandler(); | 245 virtual ~GpuMessageHandler(); |
| 246 | 246 |
| 247 // WebUIMessageHandler implementation. | 247 // WebUIMessageHandler implementation. |
| 248 virtual void RegisterMessages() OVERRIDE; | 248 virtual void RegisterMessages() override; |
| 249 | 249 |
| 250 // GpuDataManagerObserver implementation. | 250 // GpuDataManagerObserver implementation. |
| 251 virtual void OnGpuInfoUpdate() OVERRIDE; | 251 virtual void OnGpuInfoUpdate() override; |
| 252 virtual void OnGpuSwitching() OVERRIDE; | 252 virtual void OnGpuSwitching() override; |
| 253 | 253 |
| 254 // Messages | 254 // Messages |
| 255 void OnBrowserBridgeInitialized(const base::ListValue* list); | 255 void OnBrowserBridgeInitialized(const base::ListValue* list); |
| 256 void OnCallAsync(const base::ListValue* list); | 256 void OnCallAsync(const base::ListValue* list); |
| 257 | 257 |
| 258 // Submessages dispatched from OnCallAsync | 258 // Submessages dispatched from OnCallAsync |
| 259 base::Value* OnRequestClientInfo(const base::ListValue* list); | 259 base::Value* OnRequestClientInfo(const base::ListValue* list); |
| 260 base::Value* OnRequestLogMessages(const base::ListValue* list); | 260 base::Value* OnRequestLogMessages(const base::ListValue* list); |
| 261 | 261 |
| 262 private: | 262 private: |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 420 : WebUIController(web_ui) { | 420 : WebUIController(web_ui) { |
| 421 web_ui->AddMessageHandler(new GpuMessageHandler()); | 421 web_ui->AddMessageHandler(new GpuMessageHandler()); |
| 422 | 422 |
| 423 // Set up the chrome://gpu/ source. | 423 // Set up the chrome://gpu/ source. |
| 424 BrowserContext* browser_context = | 424 BrowserContext* browser_context = |
| 425 web_ui->GetWebContents()->GetBrowserContext(); | 425 web_ui->GetWebContents()->GetBrowserContext(); |
| 426 WebUIDataSource::Add(browser_context, CreateGpuHTMLSource()); | 426 WebUIDataSource::Add(browser_context, CreateGpuHTMLSource()); |
| 427 } | 427 } |
| 428 | 428 |
| 429 } // namespace content | 429 } // namespace content |
| OLD | NEW |