OLD | NEW |
---|---|
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/chrome_extension_test_notification_observer. h> | 5 #include <chrome/browser/extensions/chrome_extension_test_notification_observer. h> |
limasdf
2017/03/29 15:24:55
is this intended? I think < should be "
Devlin
2017/03/30 22:21:57
Yeah, this should be "".
| |
6 #include "base/scoped_observer.h" | 6 #include "base/scoped_observer.h" |
7 #include "chrome/browser/extensions/extension_action_test_util.h" | 7 #include "chrome/browser/extensions/extension_action_test_util.h" |
8 #include "chrome/browser/extensions/extension_util.h" | 8 #include "chrome/browser/extensions/extension_util.h" |
9 #include "chrome/browser/profiles/profile_manager.h" | 9 #include "chrome/browser/profiles/profile_manager.h" |
10 #include "chrome/browser/ui/browser.h" | 10 #include "chrome/browser/ui/browser.h" |
11 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 11 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
12 #include "content/public/browser/browser_context.h" | 12 #include "content/public/browser/browser_context.h" |
13 #include "content/public/browser/web_contents.h" | 13 #include "content/public/browser/web_contents.h" |
14 #include "extensions/browser/notification_types.h" | 14 #include "extensions/browser/notification_types.h" |
15 #include "extensions/browser/process_manager.h" | 15 #include "extensions/browser/process_manager.h" |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
108 WaitForCondition(base::Bind( | 108 WaitForCondition(base::Bind( |
109 [](const std::string& extension_id, | 109 [](const std::string& extension_id, |
110 content::BrowserContext* context) -> bool { | 110 content::BrowserContext* context) -> bool { |
111 return !util::IsExtensionIdle(extension_id, context); | 111 return !util::IsExtensionIdle(extension_id, context); |
112 }, | 112 }, |
113 extension_id, GetBrowserContext()), | 113 extension_id, GetBrowserContext()), |
114 ¬ification_set); | 114 ¬ification_set); |
115 return true; | 115 return true; |
116 } | 116 } |
117 | 117 |
118 void ChromeExtensionTestNotificationObserver::WaitForExtensionAndViewLoad() { | |
119 WaitForExtensionLoad(); | |
120 WaitForExtensionViewsToLoad(); | |
121 } | |
122 | |
123 void ChromeExtensionTestNotificationObserver::OnPageActionsUpdated( | 118 void ChromeExtensionTestNotificationObserver::OnPageActionsUpdated( |
124 content::WebContents* web_contents) { | 119 content::WebContents* web_contents) { |
125 MaybeQuit(); | 120 MaybeQuit(); |
126 } | 121 } |
127 | 122 |
128 } // namespace extensions | 123 } // namespace extensions |
OLD | NEW |