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

Side by Side Diff: chrome/browser/extensions/test_extension_system.cc

Issue 10871086: First part of remembering platform app window geometry. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix comments Created 8 years, 3 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 #include "chrome/browser/extensions/test_extension_system.h" 5 #include "chrome/browser/extensions/test_extension_system.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "chrome/browser/extensions/api/alarms/alarm_manager.h" 8 #include "chrome/browser/extensions/api/alarms/alarm_manager.h"
9 #include "chrome/browser/extensions/api/messaging/message_service.h" 9 #include "chrome/browser/extensions/api/messaging/message_service.h"
10 #include "chrome/browser/extensions/event_router.h" 10 #include "chrome/browser/extensions/event_router.h"
11 #include "chrome/browser/extensions/extension_devtools_manager.h" 11 #include "chrome/browser/extensions/extension_devtools_manager.h"
12 #include "chrome/browser/extensions/extension_info_map.h" 12 #include "chrome/browser/extensions/extension_info_map.h"
13 #include "chrome/browser/extensions/extension_pref_value_map.h" 13 #include "chrome/browser/extensions/extension_pref_value_map.h"
14 #include "chrome/browser/extensions/extension_pref_value_map_factory.h" 14 #include "chrome/browser/extensions/extension_pref_value_map_factory.h"
15 #include "chrome/browser/extensions/extension_process_manager.h" 15 #include "chrome/browser/extensions/extension_process_manager.h"
16 #include "chrome/browser/extensions/extension_service.h" 16 #include "chrome/browser/extensions/extension_service.h"
17 #include "chrome/browser/extensions/extension_system.h" 17 #include "chrome/browser/extensions/extension_system.h"
18 #include "chrome/browser/extensions/shell_window_geometry_cache.h"
18 #include "chrome/browser/extensions/state_store.h" 19 #include "chrome/browser/extensions/state_store.h"
19 #include "chrome/browser/extensions/user_script_master.h" 20 #include "chrome/browser/extensions/user_script_master.h"
20 #include "chrome/browser/profiles/profile.h" 21 #include "chrome/browser/profiles/profile.h"
21 #include "chrome/browser/value_store/testing_value_store.h" 22 #include "chrome/browser/value_store/testing_value_store.h"
22 #include "chrome/common/chrome_switches.h" 23 #include "chrome/common/chrome_switches.h"
23 #include "content/public/browser/browser_thread.h" 24 #include "content/public/browser/browser_thread.h"
24 25
25 using content::BrowserThread; 26 using content::BrowserThread;
26 27
27 namespace extensions { 28 namespace extensions {
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 // Note that the GetPrefs() creates a TestingPrefService, therefore 69 // Note that the GetPrefs() creates a TestingPrefService, therefore
69 // the extension controlled pref values set in extension_prefs_ 70 // the extension controlled pref values set in extension_prefs_
70 // are not reflected in the pref service. One would need to 71 // are not reflected in the pref service. One would need to
71 // inject a new ExtensionPrefStore(extension_pref_value_map, false). 72 // inject a new ExtensionPrefStore(extension_pref_value_map, false).
72 73
73 extension_prefs_.reset(new ExtensionPrefs( 74 extension_prefs_.reset(new ExtensionPrefs(
74 profile_->GetPrefs(), 75 profile_->GetPrefs(),
75 install_directory, 76 install_directory,
76 ExtensionPrefValueMapFactory::GetForProfile(profile_))); 77 ExtensionPrefValueMapFactory::GetForProfile(profile_)));
77 state_store_.reset(new StateStore(profile_, new TestingValueStore())); 78 state_store_.reset(new StateStore(profile_, new TestingValueStore()));
79 shell_window_geometry_cache_.reset(
80 new ShellWindowGeometryCache(profile_, state_store_.get()));
78 extension_prefs_->Init(extensions_disabled); 81 extension_prefs_->Init(extensions_disabled);
79 extension_service_.reset(new ExtensionService(profile_, 82 extension_service_.reset(new ExtensionService(profile_,
80 command_line, 83 command_line,
81 install_directory, 84 install_directory,
82 extension_prefs_.get(), 85 extension_prefs_.get(),
83 autoupdate_enabled, 86 autoupdate_enabled,
84 true)); 87 true));
85 extension_service_->ClearProvidersForTesting(); 88 extension_service_->ClearProvidersForTesting();
86 return extension_service_.get(); 89 return extension_service_.get();
87 } 90 }
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 } 122 }
120 123
121 AlarmManager* TestExtensionSystem::alarm_manager() { 124 AlarmManager* TestExtensionSystem::alarm_manager() {
122 return alarm_manager_.get(); 125 return alarm_manager_.get();
123 } 126 }
124 127
125 StateStore* TestExtensionSystem::state_store() { 128 StateStore* TestExtensionSystem::state_store() {
126 return state_store_.get(); 129 return state_store_.get();
127 } 130 }
128 131
132 ShellWindowGeometryCache* TestExtensionSystem::shell_window_geometry_cache() {
133 return shell_window_geometry_cache_.get();
134 }
135
129 ExtensionInfoMap* TestExtensionSystem::info_map() { 136 ExtensionInfoMap* TestExtensionSystem::info_map() {
130 return info_map_.get(); 137 return info_map_.get();
131 } 138 }
132 139
133 LazyBackgroundTaskQueue* 140 LazyBackgroundTaskQueue*
134 TestExtensionSystem::lazy_background_task_queue() { 141 TestExtensionSystem::lazy_background_task_queue() {
135 return NULL; 142 return NULL;
136 } 143 }
137 144
138 MessageService* TestExtensionSystem::message_service() { 145 MessageService* TestExtensionSystem::message_service() {
(...skipping 21 matching lines...) Expand all
160 TestExtensionSystem::usb_device_resource_manager() { 167 TestExtensionSystem::usb_device_resource_manager() {
161 return NULL; 168 return NULL;
162 } 169 }
163 170
164 // static 171 // static
165 ProfileKeyedService* TestExtensionSystem::Build(Profile* profile) { 172 ProfileKeyedService* TestExtensionSystem::Build(Profile* profile) {
166 return new TestExtensionSystem(profile); 173 return new TestExtensionSystem(profile);
167 } 174 }
168 175
169 } // namespace extensions 176 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/test_extension_system.h ('k') | chrome/browser/ui/extensions/shell_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698