| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "base/command_line.h" | 5 #include "base/command_line.h" |
| 6 #include "base/message_loop/message_loop.h" | 6 #include "base/message_loop/message_loop.h" |
| 7 #include "base/run_loop.h" | 7 #include "base/run_loop.h" |
| 8 #include "base/time/time.h" | 8 #include "base/time/time.h" |
| 9 #include "content/browser/gpu/gpu_data_manager_impl_private.h" | 9 #include "content/browser/gpu/gpu_data_manager_impl_private.h" |
| 10 #include "content/public/browser/gpu_data_manager_observer.h" | 10 #include "content/public/browser/gpu_data_manager_observer.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 : gpu_info_updated_(false), | 29 : gpu_info_updated_(false), |
| 30 video_memory_usage_stats_updated_(false) { | 30 video_memory_usage_stats_updated_(false) { |
| 31 } | 31 } |
| 32 virtual ~TestObserver() { } | 32 virtual ~TestObserver() { } |
| 33 | 33 |
| 34 bool gpu_info_updated() const { return gpu_info_updated_; } | 34 bool gpu_info_updated() const { return gpu_info_updated_; } |
| 35 bool video_memory_usage_stats_updated() const { | 35 bool video_memory_usage_stats_updated() const { |
| 36 return video_memory_usage_stats_updated_; | 36 return video_memory_usage_stats_updated_; |
| 37 } | 37 } |
| 38 | 38 |
| 39 virtual void OnGpuInfoUpdate() OVERRIDE { | 39 virtual void OnGpuInfoUpdate() override { |
| 40 gpu_info_updated_ = true; | 40 gpu_info_updated_ = true; |
| 41 } | 41 } |
| 42 | 42 |
| 43 virtual void OnVideoMemoryUsageStatsUpdate( | 43 virtual void OnVideoMemoryUsageStatsUpdate( |
| 44 const GPUVideoMemoryUsageStats& stats) OVERRIDE { | 44 const GPUVideoMemoryUsageStats& stats) override { |
| 45 video_memory_usage_stats_updated_ = true; | 45 video_memory_usage_stats_updated_ = true; |
| 46 } | 46 } |
| 47 | 47 |
| 48 void Reset() { | 48 void Reset() { |
| 49 gpu_info_updated_ = false; | 49 gpu_info_updated_ = false; |
| 50 video_memory_usage_stats_updated_ = false; | 50 video_memory_usage_stats_updated_ = false; |
| 51 } | 51 } |
| 52 | 52 |
| 53 private: | 53 private: |
| 54 bool gpu_info_updated_; | 54 bool gpu_info_updated_; |
| (...skipping 694 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 749 EXPECT_TRUE(manager->UpdateActiveGpu(0x8086, 0x04a1)); | 749 EXPECT_TRUE(manager->UpdateActiveGpu(0x8086, 0x04a1)); |
| 750 { | 750 { |
| 751 base::RunLoop run_loop; | 751 base::RunLoop run_loop; |
| 752 run_loop.RunUntilIdle(); | 752 run_loop.RunUntilIdle(); |
| 753 } | 753 } |
| 754 EXPECT_TRUE(observer.gpu_info_updated()); | 754 EXPECT_TRUE(observer.gpu_info_updated()); |
| 755 EXPECT_EQ(1u, manager->GetBlacklistedFeatureCount()); | 755 EXPECT_EQ(1u, manager->GetBlacklistedFeatureCount()); |
| 756 } | 756 } |
| 757 | 757 |
| 758 } // namespace content | 758 } // namespace content |
| OLD | NEW |