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

Side by Side Diff: extensions/browser/test_extensions_browser_client.h

Issue 2934293003: The chrome.lockScreen.data API implementation (Closed)
Patch Set: switch to BackendTaskRunner Created 3 years, 5 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 EXTENSIONS_BROWSER_TEST_EXTENSIONS_BROWSER_CLIENT_H_ 5 #ifndef EXTENSIONS_BROWSER_TEST_EXTENSIONS_BROWSER_CLIENT_H_
6 #define EXTENSIONS_BROWSER_TEST_EXTENSIONS_BROWSER_CLIENT_H_ 6 #define EXTENSIONS_BROWSER_TEST_EXTENSIONS_BROWSER_CLIENT_H_
7 7
8 #include <memory>
8 #include <string> 9 #include <string>
9 #include <utility> 10 #include <utility>
10 #include <vector> 11 #include <vector>
11 12
12 #include "base/callback.h" 13 #include "base/callback.h"
13 #include "base/compiler_specific.h" 14 #include "base/compiler_specific.h"
14 #include "base/macros.h" 15 #include "base/macros.h"
15 #include "base/memory/ref_counted.h" 16 #include "base/memory/ref_counted.h"
16 #include "build/build_config.h" 17 #include "build/build_config.h"
17 #include "components/update_client/update_client.h" 18 #include "components/update_client/update_client.h"
(...skipping 15 matching lines...) Expand all
33 void set_process_manager_delegate(ProcessManagerDelegate* delegate) { 34 void set_process_manager_delegate(ProcessManagerDelegate* delegate) {
34 process_manager_delegate_ = delegate; 35 process_manager_delegate_ = delegate;
35 } 36 }
36 void set_extension_system_factory(ExtensionSystemProvider* factory) { 37 void set_extension_system_factory(ExtensionSystemProvider* factory) {
37 extension_system_factory_ = factory; 38 extension_system_factory_ = factory;
38 } 39 }
39 void set_extension_cache(std::unique_ptr<ExtensionCache> extension_cache) { 40 void set_extension_cache(std::unique_ptr<ExtensionCache> extension_cache) {
40 extension_cache_ = std::move(extension_cache); 41 extension_cache_ = std::move(extension_cache);
41 } 42 }
42 43
44 void set_lock_screen_context(content::BrowserContext* context) {
45 lock_screen_context_ = context;
46 }
47
43 // Sets a factory to respond to calls of the CreateUpdateClient method. 48 // Sets a factory to respond to calls of the CreateUpdateClient method.
44 void SetUpdateClientFactory( 49 void SetUpdateClientFactory(
45 const base::Callback<update_client::UpdateClient*(void)>& factory); 50 const base::Callback<update_client::UpdateClient*(void)>& factory);
46 51
47 // Associates an incognito context with |main_context_|. 52 // Associates an incognito context with |main_context_|.
48 void SetIncognitoContext(content::BrowserContext* incognito_context); 53 void SetIncognitoContext(content::BrowserContext* incognito_context);
49 54
50 // ExtensionsBrowserClient overrides: 55 // ExtensionsBrowserClient overrides:
51 bool IsShuttingDown() override; 56 bool IsShuttingDown() override;
52 bool AreExtensionsDisabled(const base::CommandLine& command_line, 57 bool AreExtensionsDisabled(const base::CommandLine& command_line,
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 KioskDelegate* GetKioskDelegate() override; 118 KioskDelegate* GetKioskDelegate() override;
114 scoped_refptr<update_client::UpdateClient> CreateUpdateClient( 119 scoped_refptr<update_client::UpdateClient> CreateUpdateClient(
115 content::BrowserContext* context) override; 120 content::BrowserContext* context) override;
116 bool IsLockScreenContext(content::BrowserContext* context) override; 121 bool IsLockScreenContext(content::BrowserContext* context) override;
117 122
118 ExtensionSystemProvider* extension_system_factory() { 123 ExtensionSystemProvider* extension_system_factory() {
119 return extension_system_factory_; 124 return extension_system_factory_;
120 } 125 }
121 126
122 private: 127 private:
123 content::BrowserContext* main_context_; // Not owned. 128 // Not owned.
124 content::BrowserContext* incognito_context_; // Not owned, defaults to NULL. 129 content::BrowserContext* main_context_;
130 // Not owned, defaults to nullptr.
131 content::BrowserContext* incognito_context_;
132 // Not owned, defaults to nullptr.
133 content::BrowserContext* lock_screen_context_;
125 134
126 // Not owned, defaults to NULL. 135 // Not owned, defaults to nullptr.
127 ProcessManagerDelegate* process_manager_delegate_; 136 ProcessManagerDelegate* process_manager_delegate_;
128 137
129 // Not owned, defaults to NULL. 138 // Not owned, defaults to nullptr.
130 ExtensionSystemProvider* extension_system_factory_; 139 ExtensionSystemProvider* extension_system_factory_;
131 140
132 std::unique_ptr<ExtensionCache> extension_cache_; 141 std::unique_ptr<ExtensionCache> extension_cache_;
133 142
134 base::Callback<update_client::UpdateClient*(void)> update_client_factory_; 143 base::Callback<update_client::UpdateClient*(void)> update_client_factory_;
135 144
136 DISALLOW_COPY_AND_ASSIGN(TestExtensionsBrowserClient); 145 DISALLOW_COPY_AND_ASSIGN(TestExtensionsBrowserClient);
137 }; 146 };
138 147
139 } // namespace extensions 148 } // namespace extensions
140 149
141 #endif // EXTENSIONS_BROWSER_TEST_EXTENSIONS_BROWSER_CLIENT_H_ 150 #endif // EXTENSIONS_BROWSER_TEST_EXTENSIONS_BROWSER_CLIENT_H_
OLDNEW
« no previous file with comments | « extensions/browser/api/lock_screen_data/operation_result.h ('k') | extensions/browser/test_extensions_browser_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698