Chromium Code Reviews| Index: extensions/renderer/script_context_set.h |
| diff --git a/extensions/renderer/script_context_set.h b/extensions/renderer/script_context_set.h |
| index eddefb7c67a2ef0cc75d7c834a7a7a1c0a40b558..db90129e94d68a4b4b4c5222d9dfce0ca9d1c970 100644 |
| --- a/extensions/renderer/script_context_set.h |
| +++ b/extensions/renderer/script_context_set.h |
| @@ -40,7 +40,7 @@ class ScriptContext; |
| // changing underneath callers. |
| class ScriptContextSet { |
| public: |
| - ScriptContextSet( |
| + explicit ScriptContextSet( |
| // Set of the IDs of extensions that are active in this process. |
| // Must outlive this. TODO(kalman): Combine this and |extensions|. |
| ExtensionIdSet* active_extension_ids); |
| @@ -106,6 +106,10 @@ class ScriptContextSet { |
| // Cleans up contexts belonging to an unloaded extension. |
| void OnExtensionUnloaded(const std::string& extension_id); |
| + void set_lock_screen_context(bool lock_screen_context) { |
|
Devlin
2017/06/01 22:17:58
nit: prefer set_*is*_lock_screen_context (to diffe
tbarzic
2017/06/02 00:49:05
Done.
|
| + lock_screen_context_ = lock_screen_context; |
| + } |
| + |
| // Adds the given |context| for testing purposes. |
| void AddForTesting(std::unique_ptr<ScriptContext> context); |
| @@ -133,6 +137,10 @@ class ScriptContextSet { |
| // The set of all ScriptContexts we own. |
| std::set<ScriptContext*> contexts_; |
| + // Whether the script context set is associated with the renderer active on |
| + // the Chrome OS lock screen. |
| + bool lock_screen_context_ = false; |
| + |
| DISALLOW_COPY_AND_ASSIGN(ScriptContextSet); |
| }; |