| OLD | NEW |
| 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 Loading... |
| 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_ |
| OLD | NEW |