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

Unified Diff: content/browser/gpu/gpu_internals_ui.cc

Issue 17565002: Merge crbug.com/232556 to M28 branch (1500). (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1500/src/
Patch Set: Created 7 years, 6 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 | « content/browser/gpu/gpu_data_manager_impl_unittest.cc ('k') | content/content_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
}
« no previous file with comments | « content/browser/gpu/gpu_data_manager_impl_unittest.cc ('k') | content/content_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698