OLD | NEW |
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 #ifndef CHROME_BROWSER_BACKGROUND_BACKGROUND_CONTENTS_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_BACKGROUND_BACKGROUND_CONTENTS_SERVICE_H_ |
6 #define CHROME_BROWSER_BACKGROUND_BACKGROUND_CONTENTS_SERVICE_H_ | 6 #define CHROME_BROWSER_BACKGROUND_BACKGROUND_CONTENTS_SERVICE_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 | 68 |
69 // Get the crash notification's delegate id for the extension. | 69 // Get the crash notification's delegate id for the extension. |
70 static std::string GetNotificationDelegateIdForExtensionForTesting( | 70 static std::string GetNotificationDelegateIdForExtensionForTesting( |
71 const std::string& extension_id); | 71 const std::string& extension_id); |
72 | 72 |
73 // Show a popup notification balloon with a crash message for a given app/ | 73 // Show a popup notification balloon with a crash message for a given app/ |
74 // extension. | 74 // extension. |
75 static void ShowBalloonForTesting(const extensions::Extension* extension, | 75 static void ShowBalloonForTesting(const extensions::Extension* extension, |
76 Profile* profile); | 76 Profile* profile); |
77 | 77 |
| 78 // Disable closing the crash notification balloon for tests. |
| 79 static void DisableCloseBalloonForTesting( |
| 80 bool disable_close_balloon_for_testing); |
| 81 |
78 // Returns the BackgroundContents associated with the passed application id, | 82 // Returns the BackgroundContents associated with the passed application id, |
79 // or NULL if none. | 83 // or NULL if none. |
80 BackgroundContents* GetAppBackgroundContents(const base::string16& appid); | 84 BackgroundContents* GetAppBackgroundContents(const base::string16& appid); |
81 | 85 |
82 // Returns true if there's a registered BackgroundContents for this app. It | 86 // Returns true if there's a registered BackgroundContents for this app. It |
83 // is possible for this routine to return true when GetAppBackgroundContents() | 87 // is possible for this routine to return true when GetAppBackgroundContents() |
84 // returns false, if the BackgroundContents closed due to the render process | 88 // returns false, if the BackgroundContents closed due to the render process |
85 // crashing. | 89 // crashing. |
86 bool HasRegisteredBackgroundContents(const base::string16& appid); | 90 bool HasRegisteredBackgroundContents(const base::string16& appid); |
87 | 91 |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 BackgroundContentsMap contents_map_; | 240 BackgroundContentsMap contents_map_; |
237 | 241 |
238 ScopedObserver<extensions::ExtensionRegistry, | 242 ScopedObserver<extensions::ExtensionRegistry, |
239 extensions::ExtensionRegistryObserver> | 243 extensions::ExtensionRegistryObserver> |
240 extension_registry_observer_; | 244 extension_registry_observer_; |
241 | 245 |
242 DISALLOW_COPY_AND_ASSIGN(BackgroundContentsService); | 246 DISALLOW_COPY_AND_ASSIGN(BackgroundContentsService); |
243 }; | 247 }; |
244 | 248 |
245 #endif // CHROME_BROWSER_BACKGROUND_BACKGROUND_CONTENTS_SERVICE_H_ | 249 #endif // CHROME_BROWSER_BACKGROUND_BACKGROUND_CONTENTS_SERVICE_H_ |
OLD | NEW |