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

Unified Diff: chrome/browser/ui/webui/tracing_ui.cc

Issue 10908110: Move gpu blacklist to content side. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/webui/gpu_internals_ui.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/tracing_ui.cc
===================================================================
--- chrome/browser/ui/webui/tracing_ui.cc (revision 155054)
+++ chrome/browser/ui/webui/tracing_ui.cc (working copy)
@@ -15,8 +15,6 @@
#include "base/string_number_conversions.h"
#include "base/stringprintf.h"
#include "base/utf_string_conversions.h"
-#include "chrome/browser/gpu_blacklist.h"
-#include "chrome/browser/gpu_util.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/chrome_select_file_policy.h"
#include "chrome/browser/ui/webui/chrome_url_data_manager.h"
@@ -70,8 +68,7 @@
: public WebUIMessageHandler,
public ui::SelectFileDialog::Listener,
public base::SupportsWeakPtr<TracingMessageHandler>,
- public content::TraceSubscriber,
- public content::GpuDataManagerObserver {
+ public content::TraceSubscriber {
public:
TracingMessageHandler();
virtual ~TracingMessageHandler();
@@ -89,11 +86,6 @@
const scoped_refptr<base::RefCountedString>& trace_fragment);
virtual void OnTraceBufferPercentFullReply(float percent_full);
- // GpuDataManagerObserver implementation.
- virtual void OnGpuInfoUpdate() OVERRIDE;
- virtual void OnVideoMemoryUsageStatsUpdate(
- const content::GPUVideoMemoryUsageStats& video_memory) OVERRIDE {}
-
// Messages.
void OnTracingControllerInitialized(const ListValue* list);
void OnBeginTracing(const ListValue* list);
@@ -123,10 +115,6 @@
// True while system tracing is active.
bool system_trace_in_progress_;
- // True if observing the GpuDataManager (re-attaching as observer would
- // DCHECK).
- bool observing_;
-
void OnEndSystemTracingAck(
const scoped_refptr<base::RefCountedString>& events_str_ptr);
@@ -169,13 +157,10 @@
TracingMessageHandler::TracingMessageHandler()
: select_trace_file_dialog_type_(ui::SelectFileDialog::SELECT_NONE),
trace_enabled_(false),
- system_trace_in_progress_(false),
- observing_(false) {
+ system_trace_in_progress_(false) {
}
TracingMessageHandler::~TracingMessageHandler() {
- GpuDataManager::GetInstance()->RemoveObserver(this);
-
if (select_trace_file_dialog_)
select_trace_file_dialog_->ListenerDestroyed();
@@ -219,19 +204,6 @@
const ListValue* args) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- // Watch for changes in GPUInfo
- if (!observing_)
- GpuDataManager::GetInstance()->AddObserver(this);
- observing_ = true;
-
- // Tell GpuDataManager it should have full GpuInfo. If the
- // Gpu process has not run yet, this will trigger its launch.
- GpuDataManager::GetInstance()->RequestCompleteGpuInfoIfNeeded();
-
- // Run callback immediately in case the info is ready and no update in the
- // future.
- OnGpuInfoUpdate();
-
// Send the client info to the tracingController
{
scoped_ptr<DictionaryValue> dict(new DictionaryValue());
@@ -256,7 +228,7 @@
}
dict->SetString("blacklist_version",
- GpuBlacklist::GetInstance()->GetVersion());
+ GpuDataManager::GetInstance()->GetBlacklistVersion());
web_ui()->CallJavascriptFunction("tracingController.onClientInfoUpdate",
*dict);
}
@@ -267,21 +239,6 @@
TraceController::GetInstance()->GetTraceBufferPercentFullAsync(this);
}
-void TracingMessageHandler::OnGpuInfoUpdate() {
- // Get GPU Info.
- scoped_ptr<base::DictionaryValue> gpu_info_val(
- gpu_util::GpuInfoAsDictionaryValue());
-
- // Add in blacklisting features
- Value* feature_status = gpu_util::GetFeatureStatus();
- if (feature_status)
- gpu_info_val->Set("featureStatus", feature_status);
-
- // Send GPU Info to javascript.
- web_ui()->CallJavascriptFunction("tracingController.onGpuInfoUpdate",
- *(gpu_info_val.get()));
-}
-
// A callback used for asynchronously reading a file to a string. Calls the
// TaskProxy callback when reading is complete.
void ReadTraceFileCallback(TaskProxy* proxy, const FilePath& path) {
« no previous file with comments | « chrome/browser/ui/webui/gpu_internals_ui.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698