OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_USER_SCRIPT_LISTENER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_USER_SCRIPT_LISTENER_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_USER_SCRIPT_LISTENER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_USER_SCRIPT_LISTENER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <list> | 9 #include <list> |
10 | 10 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 net::URLRequest* request, | 42 net::URLRequest* request, |
43 const ResourceDispatcherHostRequestInfo& request_info, | 43 const ResourceDispatcherHostRequestInfo& request_info, |
44 const GlobalRequestID& request_id); | 44 const GlobalRequestID& request_id); |
45 virtual void WillShutdownResourceQueue(); | 45 virtual void WillShutdownResourceQueue(); |
46 | 46 |
47 private: | 47 private: |
48 friend class base::RefCountedThreadSafe<UserScriptListener>; | 48 friend class base::RefCountedThreadSafe<UserScriptListener>; |
49 | 49 |
50 typedef std::list<URLPattern> URLPatterns; | 50 typedef std::list<URLPattern> URLPatterns; |
51 | 51 |
52 ~UserScriptListener(); | 52 virtual ~UserScriptListener(); |
53 | 53 |
54 // Resume any requests that we delayed in order to wait for user scripts. | 54 // Resume any requests that we delayed in order to wait for user scripts. |
55 void StartDelayedRequests(); | 55 void StartDelayedRequests(); |
56 | 56 |
57 // Appends new url patterns to our list, also setting user_scripts_ready_ | 57 // Appends new url patterns to our list, also setting user_scripts_ready_ |
58 // to false. | 58 // to false. |
59 void AppendNewURLPatterns(const URLPatterns& new_patterns); | 59 void AppendNewURLPatterns(const URLPatterns& new_patterns); |
60 | 60 |
61 // Replaces our url pattern list. This is only used when patterns have been | 61 // Replaces our url pattern list. This is only used when patterns have been |
62 // deleted, so user_scripts_ready_ remains unchanged. | 62 // deleted, so user_scripts_ready_ remains unchanged. |
(...skipping 29 matching lines...) Expand all Loading... |
92 virtual void Observe(NotificationType type, | 92 virtual void Observe(NotificationType type, |
93 const NotificationSource& source, | 93 const NotificationSource& source, |
94 const NotificationDetails& details); | 94 const NotificationDetails& details); |
95 | 95 |
96 NotificationRegistrar registrar_; | 96 NotificationRegistrar registrar_; |
97 | 97 |
98 DISALLOW_COPY_AND_ASSIGN(UserScriptListener); | 98 DISALLOW_COPY_AND_ASSIGN(UserScriptListener); |
99 }; | 99 }; |
100 | 100 |
101 #endif // CHROME_BROWSER_EXTENSIONS_USER_SCRIPT_LISTENER_H_ | 101 #endif // CHROME_BROWSER_EXTENSIONS_USER_SCRIPT_LISTENER_H_ |
OLD | NEW |