| Index: content/browser/gpu/gpu_internals_ui.cc
|
| ===================================================================
|
| --- content/browser/gpu/gpu_internals_ui.cc (revision 207877)
|
| +++ content/browser/gpu/gpu_internals_ui.cc (working copy)
|
| @@ -479,10 +479,8 @@
|
|
|
| // GpuDataManagerObserver implementation.
|
| virtual void OnGpuInfoUpdate() OVERRIDE;
|
| + virtual void OnGpuSwitching() OVERRIDE;
|
|
|
| - // Gpu switch handler.
|
| - void OnGpuSwitch();
|
| -
|
| // Messages
|
| void OnBrowserBridgeInitialized(const base::ListValue* list);
|
| void OnCallAsync(const base::ListValue* list);
|
| @@ -496,8 +494,6 @@
|
| // DCHECK).
|
| bool observing_;
|
|
|
| - GpuDataManagerImpl::GpuSwitchCallback gpu_switch_callback_;
|
| -
|
| DISALLOW_COPY_AND_ASSIGN(GpuMessageHandler);
|
| };
|
|
|
| @@ -508,15 +504,11 @@
|
| ////////////////////////////////////////////////////////////////////////////////
|
|
|
| GpuMessageHandler::GpuMessageHandler()
|
| - : observing_(false),
|
| - gpu_switch_callback_(base::Bind(&GpuMessageHandler::OnGpuSwitch,
|
| - base::Unretained(this))) {
|
| + : observing_(false) {
|
| }
|
|
|
| GpuMessageHandler::~GpuMessageHandler() {
|
| GpuDataManagerImpl::GetInstance()->RemoveObserver(this);
|
| - GpuDataManagerImpl::GetInstance()->RemoveGpuSwitchCallback(
|
| - gpu_switch_callback_);
|
| }
|
|
|
| /* BrowserBridge.callAsync prepends a requestID to these messages. */
|
| @@ -583,11 +575,8 @@
|
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
|
|
| // Watch for changes in GPUInfo
|
| - if (!observing_) {
|
| + if (!observing_)
|
| GpuDataManagerImpl::GetInstance()->AddObserver(this);
|
| - GpuDataManagerImpl::GetInstance()->AddGpuSwitchCallback(
|
| - gpu_switch_callback_);
|
| - }
|
| observing_ = true;
|
|
|
| // Tell GpuDataManager it should have full GpuInfo. If the
|
| @@ -639,7 +628,7 @@
|
| *(gpu_info_val.get()));
|
| }
|
|
|
| -void GpuMessageHandler::OnGpuSwitch() {
|
| +void GpuMessageHandler::OnGpuSwitching() {
|
| GpuDataManagerImpl::GetInstance()->RequestCompleteGpuInfoIfNeeded();
|
| }
|
|
|
|
|