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

Side by Side Diff: chrome/browser/tab_contents/render_view_host_delegate_helper.h

Issue 5334003: Added a master switch to enable/disable gpu acceleration. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_HOST_DELEGATE_HELPER_H_ 5 #ifndef CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_HOST_DELEGATE_HELPER_H_
6 #define CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_HOST_DELEGATE_HELPER_H_ 6 #define CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_HOST_DELEGATE_HELPER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 10
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 // RenderViewHostDelegate methods. 97 // RenderViewHostDelegate methods.
98 class RenderViewHostDelegateHelper { 98 class RenderViewHostDelegateHelper {
99 public: 99 public:
100 static WebPreferences GetWebkitPrefs(Profile* profile, bool is_dom_ui); 100 static WebPreferences GetWebkitPrefs(Profile* profile, bool is_dom_ui);
101 101
102 static void UpdateInspectorSetting(Profile* profile, 102 static void UpdateInspectorSetting(Profile* profile,
103 const std::string& key, 103 const std::string& key,
104 const std::string& value); 104 const std::string& value);
105 static void ClearInspectorSettings(Profile* profile); 105 static void ClearInspectorSettings(Profile* profile);
106 106
107 static bool gpu_enabled() { return gpu_enabled_; }
108 static void set_gpu_enabled(bool enabled) { gpu_enabled_ = enabled; }
109
107 private: 110 private:
108 RenderViewHostDelegateHelper(); 111 RenderViewHostDelegateHelper();
109 112
113 // Master switch for enabling/disabling GPU acceleration for the current
114 // browser session. It does not change the acceleration settings for
115 // existing tabs, just the future ones.
116 static bool gpu_enabled_;
117
110 DISALLOW_COPY_AND_ASSIGN(RenderViewHostDelegateHelper); 118 DISALLOW_COPY_AND_ASSIGN(RenderViewHostDelegateHelper);
111 }; 119 };
112 120
113 #endif // CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_HOST_DELEGATE_HELPER_H_ 121 #endif // CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_HOST_DELEGATE_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698