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

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

Issue 671763002: Extract ProcessManager from ExtensionSystem. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Created 6 years, 1 month 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/extension_test_notification_observer.h" 5 #include "chrome/browser/extensions/extension_test_notification_observer.h"
6 6
7 #include "base/callback_list.h" 7 #include "base/callback_list.h"
8 #include "chrome/browser/extensions/extension_action_test_util.h" 8 #include "chrome/browser/extensions/extension_action_test_util.h"
9 #include "chrome/browser/extensions/extension_service.h" 9 #include "chrome/browser/extensions/extension_service.h"
10 #include "chrome/browser/profiles/profile_manager.h" 10 #include "chrome/browser/profiles/profile_manager.h"
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 WaitForCondition( 132 WaitForCondition(
133 base::Bind(&HasPageActionVisibilityReachedTarget, browser_, count), 133 base::Bind(&HasPageActionVisibilityReachedTarget, browser_, count),
134 NULL); 134 NULL);
135 extensions::ExtensionActionAPI::Get(GetProfile())-> 135 extensions::ExtensionActionAPI::Get(GetProfile())->
136 RemoveObserver(this); 136 RemoveObserver(this);
137 return true; 137 return true;
138 } 138 }
139 139
140 bool ExtensionTestNotificationObserver::WaitForExtensionViewsToLoad() { 140 bool ExtensionTestNotificationObserver::WaitForExtensionViewsToLoad() {
141 extensions::ProcessManager* manager = 141 extensions::ProcessManager* manager =
142 extensions::ExtensionSystem::Get(GetProfile())->process_manager(); 142 extensions::ProcessManager::Get(GetProfile());
143 NotificationSet notification_set; 143 NotificationSet notification_set;
144 notification_set.Add(content::NOTIFICATION_WEB_CONTENTS_DESTROYED); 144 notification_set.Add(content::NOTIFICATION_WEB_CONTENTS_DESTROYED);
145 notification_set.Add(content::NOTIFICATION_LOAD_STOP); 145 notification_set.Add(content::NOTIFICATION_LOAD_STOP);
146 WaitForCondition( 146 WaitForCondition(
147 base::Bind(&HaveAllExtensionRenderViewHostsFinishedLoading, manager), 147 base::Bind(&HaveAllExtensionRenderViewHostsFinishedLoading, manager),
148 &notification_set); 148 &notification_set);
149 return true; 149 return true;
150 } 150 }
151 151
152 bool ExtensionTestNotificationObserver::WaitForExtensionInstall() { 152 bool ExtensionTestNotificationObserver::WaitForExtensionInstall() {
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 runner->Run(); 280 runner->Run();
281 281
282 condition_.Reset(); 282 condition_.Reset();
283 quit_closure_.Reset(); 283 quit_closure_.Reset();
284 } 284 }
285 285
286 void ExtensionTestNotificationObserver::MaybeQuit() { 286 void ExtensionTestNotificationObserver::MaybeQuit() {
287 if (condition_.Run()) 287 if (condition_.Run())
288 quit_closure_.Run(); 288 quit_closure_.Run();
289 } 289 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_system_impl.cc ('k') | chrome/browser/extensions/extension_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698