Index: chrome/browser/gpu/chrome_gpu_util.cc |
diff --git a/chrome/browser/gpu/chrome_gpu_util.cc b/chrome/browser/gpu/chrome_gpu_util.cc |
index fccdc45dbefa032393049cec05f16a153b689338..d6a0e901aba76d680a865c1c81a740c9db55a0b6 100644 |
--- a/chrome/browser/gpu/chrome_gpu_util.cc |
+++ b/chrome/browser/gpu/chrome_gpu_util.cc |
@@ -24,67 +24,6 @@ using content::GpuDataManager; |
namespace gpu_util { |
-// The BrowserMonitor class is used to track the number of currently open |
-// browser windows, so that the gpu can be notified when they are created or |
-// destroyed. We only count tabbed windows for this purpose. |
- |
-// There's no BrowserList on Android/ |
-#if !defined(OS_ANDROID) |
-class BrowserMonitor : public chrome::BrowserListObserver { |
- public: |
- static BrowserMonitor* GetInstance() { |
- static BrowserMonitor* instance = NULL; |
- if (!instance) |
- instance = new BrowserMonitor; |
- return instance; |
- } |
- |
- void Install() { |
- if (!installed_) { |
- BrowserList::AddObserver(this); |
- installed_ = true; |
- } |
- } |
- |
- void Uninstall() { |
- if (installed_) { |
- BrowserList::RemoveObserver(this); |
- installed_ = false; |
- } |
- } |
- |
- private: |
- BrowserMonitor() : num_browsers_(0), installed_(false) { |
- } |
- |
- virtual ~BrowserMonitor() { |
- } |
- |
- // BrowserListObserver implementation. |
- virtual void OnBrowserAdded(Browser* browser) OVERRIDE { |
- if (browser->type() == Browser::TYPE_TABBED) |
- content::GpuDataManager::GetInstance()->SetWindowCount(++num_browsers_); |
- } |
- |
- virtual void OnBrowserRemoved(Browser* browser) OVERRIDE { |
- if (browser->type() == Browser::TYPE_TABBED) |
- content::GpuDataManager::GetInstance()->SetWindowCount(--num_browsers_); |
- } |
- |
- uint32 num_browsers_; |
- bool installed_; |
-}; |
- |
-void InstallBrowserMonitor() { |
- BrowserMonitor::GetInstance()->Install(); |
-} |
- |
-void UninstallBrowserMonitor() { |
- BrowserMonitor::GetInstance()->Uninstall(); |
-} |
- |
-#endif // !defined(OS_ANDROID) |
- |
void DisableCompositingFieldTrial() { |
base::FieldTrial* trial = |
base::FieldTrialList::Find(content::kGpuCompositingFieldTrialName); |