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

Side by Side Diff: chrome/browser/extensions/error_console/error_console.h

Issue 1016413004: [Extensions] Update Error Console UI (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 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 #ifndef CHROME_BROWSER_EXTENSIONS_ERROR_CONSOLE_ERROR_CONSOLE_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_ERROR_CONSOLE_ERROR_CONSOLE_H_
6 #define CHROME_BROWSER_EXTENSIONS_ERROR_CONSOLE_ERROR_CONSOLE_H_ 6 #define CHROME_BROWSER_EXTENSIONS_ERROR_CONSOLE_ERROR_CONSOLE_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/observer_list.h" 9 #include "base/observer_list.h"
10 #include "base/prefs/pref_change_registrar.h" 10 #include "base/prefs/pref_change_registrar.h"
(...skipping 24 matching lines...) Expand all
35 // runtime Javascript errors. If FeatureSwitch::error_console() is enabled these 35 // runtime Javascript errors. If FeatureSwitch::error_console() is enabled these
36 // errors can be viewed at chrome://extensions in developer mode. 36 // errors can be viewed at chrome://extensions in developer mode.
37 // This class is owned by ExtensionSystem, making it, in effect, a 37 // This class is owned by ExtensionSystem, making it, in effect, a
38 // BrowserContext-keyed service. 38 // BrowserContext-keyed service.
39 class ErrorConsole : public content::NotificationObserver, 39 class ErrorConsole : public content::NotificationObserver,
40 public ExtensionRegistryObserver { 40 public ExtensionRegistryObserver {
41 public: 41 public:
42 class Observer { 42 class Observer {
43 public: 43 public:
44 // Sent when a new error is reported to the error console. 44 // Sent when a new error is reported to the error console.
45 virtual void OnErrorAdded(const ExtensionError* error) = 0; 45 virtual void OnErrorAdded(const ExtensionError* error);
46
47 // Sent when errors are removed from the error console. |extension_ids| is
48 // the set of ids that were affected.
49 // Note: This is not sent when an extension is uninstalled, or when a
50 // profile is destroyed.
51 virtual void OnErrorsRemoved(const std::set<std::string>& extension_ids);
46 52
47 // Sent upon destruction to allow any observers to invalidate any references 53 // Sent upon destruction to allow any observers to invalidate any references
48 // they have to the error console. 54 // they have to the error console.
49 virtual void OnErrorConsoleDestroyed(); 55 virtual void OnErrorConsoleDestroyed();
50 }; 56 };
51 57
52 explicit ErrorConsole(Profile* profile); 58 explicit ErrorConsole(Profile* profile);
53 ~ErrorConsole() override; 59 ~ErrorConsole() override;
54 60
55 // Convenience method to return the ErrorConsole for a given |context|. 61 // Convenience method to return the ErrorConsole for a given |context|.
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 193
188 ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver> 194 ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver>
189 registry_observer_; 195 registry_observer_;
190 196
191 DISALLOW_COPY_AND_ASSIGN(ErrorConsole); 197 DISALLOW_COPY_AND_ASSIGN(ErrorConsole);
192 }; 198 };
193 199
194 } // namespace extensions 200 } // namespace extensions
195 201
196 #endif // CHROME_BROWSER_EXTENSIONS_ERROR_CONSOLE_ERROR_CONSOLE_H_ 202 #endif // CHROME_BROWSER_EXTENSIONS_ERROR_CONSOLE_ERROR_CONSOLE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698