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 #if defined(OS_CHROMEOS) | 9 #if defined(OS_CHROMEOS) |
10 #include "ash/ash_switches.h" | 10 #include "ash/ash_switches.h" |
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
452 | 452 |
453 // Messages | 453 // Messages |
454 void OnBrowserBridgeInitialized(const ListValue* list); | 454 void OnBrowserBridgeInitialized(const ListValue* list); |
455 void OnCallAsync(const ListValue* list); | 455 void OnCallAsync(const ListValue* list); |
456 | 456 |
457 // Submessages dispatched from OnCallAsync | 457 // Submessages dispatched from OnCallAsync |
458 Value* OnRequestClientInfo(const ListValue* list); | 458 Value* OnRequestClientInfo(const ListValue* list); |
459 Value* OnRequestLogMessages(const ListValue* list); | 459 Value* OnRequestLogMessages(const ListValue* list); |
460 Value* OnRequestCrashList(const ListValue* list); | 460 Value* OnRequestCrashList(const ListValue* list); |
461 | 461 |
462 // Executes the javascript function |function_name| in the renderer, passing | |
463 // it the argument |value|. | |
464 void CallJavascriptFunction(const std::wstring& function_name, | |
465 const Value* value); | |
466 | |
467 private: | 462 private: |
468 scoped_refptr<CrashUploadList> crash_list_; | 463 scoped_refptr<CrashUploadList> crash_list_; |
469 bool crash_list_available_; | 464 bool crash_list_available_; |
470 | 465 |
471 // True if observing the GpuDataManager (re-attaching as observer would | 466 // True if observing the GpuDataManager (re-attaching as observer would |
472 // DCHECK). | 467 // DCHECK). |
473 bool observing_; | 468 bool observing_; |
474 | 469 |
475 DISALLOW_COPY_AND_ASSIGN(GpuMessageHandler); | 470 DISALLOW_COPY_AND_ASSIGN(GpuMessageHandler); |
476 }; | 471 }; |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
674 //////////////////////////////////////////////////////////////////////////////// | 669 //////////////////////////////////////////////////////////////////////////////// |
675 | 670 |
676 GpuInternalsUI::GpuInternalsUI(content::WebUI* web_ui) | 671 GpuInternalsUI::GpuInternalsUI(content::WebUI* web_ui) |
677 : WebUIController(web_ui) { | 672 : WebUIController(web_ui) { |
678 web_ui->AddMessageHandler(new GpuMessageHandler()); | 673 web_ui->AddMessageHandler(new GpuMessageHandler()); |
679 | 674 |
680 // Set up the chrome://gpu-internals/ source. | 675 // Set up the chrome://gpu-internals/ source. |
681 Profile* profile = Profile::FromWebUI(web_ui); | 676 Profile* profile = Profile::FromWebUI(web_ui); |
682 ChromeURLDataManager::AddDataSource(profile, CreateGpuHTMLSource()); | 677 ChromeURLDataManager::AddDataSource(profile, CreateGpuHTMLSource()); |
683 } | 678 } |
OLD | NEW |