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

Side by Side Diff: content/public/browser/gpu_data_manager.h

Issue 9429066: Coverity: Fix a few pass-by-values. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Revert one. Created 8 years, 10 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef CONTENT_PUBLIC_BROWSER_GPU_DATA_MANAGER_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_GPU_DATA_MANAGER_H_
6 #define CONTENT_PUBLIC_BROWSER_GPU_DATA_MANAGER_H_ 6 #define CONTENT_PUBLIC_BROWSER_GPU_DATA_MANAGER_H_
7 #pragma once 7 #pragma once
8 8
9 #include "content/common/content_export.h" 9 #include "content/common/content_export.h"
10 #include "content/public/common/gpu_feature_type.h" 10 #include "content/public/common/gpu_feature_type.h"
11 11
12 class FilePath; 12 class FilePath;
13 13
14 namespace base { 14 namespace base {
15 class ListValue; 15 class ListValue;
16 } 16 }
17 17
18 namespace content { 18 namespace content {
19 19
20 class GpuDataManagerObserver; 20 class GpuDataManagerObserver;
21 struct GPUInfo; 21 struct GPUInfo;
22 22
23 // This class lives on the UI thread. Only methods that expliclity state that 23 // This class lives on the UI thread. Only methods that explicitly state that
24 // they can be called on other threads are thread-safe. 24 // they can be called on other threads are thread-safe.
25 class GpuDataManager { 25 class GpuDataManager {
26 public: 26 public:
27 // Getter for the singleton. 27 // Getter for the singleton.
28 CONTENT_EXPORT static GpuDataManager* GetInstance(); 28 CONTENT_EXPORT static GpuDataManager* GetInstance();
29 29
30 // Can be called on any thread. 30 // Can be called on any thread.
31 virtual GpuFeatureType GetGpuFeatureType() = 0; 31 virtual GpuFeatureType GetGpuFeatureType() = 0;
32 32
33 // Gives the new feature flags. This is always called on the UI thread. 33 // Gives the new feature flags. This is always called on the UI thread.
(...skipping 11 matching lines...) Expand all
45 45
46 // Requests complete GPUinfo if it has not already been requested 46 // Requests complete GPUinfo if it has not already been requested
47 virtual void RequestCompleteGpuInfoIfNeeded() = 0; 47 virtual void RequestCompleteGpuInfoIfNeeded() = 0;
48 48
49 virtual bool IsCompleteGPUInfoAvailable() const = 0; 49 virtual bool IsCompleteGPUInfoAvailable() const = 0;
50 50
51 // Returns true if the software rendering should currently be used. 51 // Returns true if the software rendering should currently be used.
52 virtual bool ShouldUseSoftwareRendering() = 0; 52 virtual bool ShouldUseSoftwareRendering() = 0;
53 53
54 // Register a path to the SwiftShader software renderer. 54 // Register a path to the SwiftShader software renderer.
55 virtual void RegisterSwiftShaderPath(FilePath path) = 0; 55 virtual void RegisterSwiftShaderPath(const FilePath& path) = 0;
56 56
57 virtual const base::ListValue& GetLogMessages() const = 0; 57 virtual const base::ListValue& GetLogMessages() const = 0;
58 58
59 // Registers/unregister |observer|. 59 // Registers/unregister |observer|.
60 virtual void AddObserver(GpuDataManagerObserver* observer) = 0; 60 virtual void AddObserver(GpuDataManagerObserver* observer) = 0;
61 virtual void RemoveObserver(GpuDataManagerObserver* observer) = 0; 61 virtual void RemoveObserver(GpuDataManagerObserver* observer) = 0;
62 62
63 protected: 63 protected:
64 virtual ~GpuDataManager() {} 64 virtual ~GpuDataManager() {}
65 }; 65 };
66 66
67 }; // namespace content 67 }; // namespace content
68 68
69 #endif // CONTENT_PUBLIC_BROWSER_GPU_DATA_MANAGER_H_ 69 #endif // CONTENT_PUBLIC_BROWSER_GPU_DATA_MANAGER_H_
OLDNEW
« no previous file with comments | « content/browser/gpu/gpu_data_manager_impl.cc ('k') | ppapi/native_client/src/trusted/plugin/service_runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698