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_CUSTOM_HANDLERS_PROTOCOL_HANDLER_REGISTRY_H_ | 5 #ifndef CHROME_BROWSER_CUSTOM_HANDLERS_PROTOCOL_HANDLER_REGISTRY_H_ |
6 #define CHROME_BROWSER_CUSTOM_HANDLERS_PROTOCOL_HANDLER_REGISTRY_H_ | 6 #define CHROME_BROWSER_CUSTOM_HANDLERS_PROTOCOL_HANDLER_REGISTRY_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 // registry. | 194 // registry. |
195 void GetRegisteredProtocols(std::vector<std::string>* output) const; | 195 void GetRegisteredProtocols(std::vector<std::string>* output) const; |
196 | 196 |
197 // Returns true if we allow websites to register handlers for the given | 197 // Returns true if we allow websites to register handlers for the given |
198 // scheme. | 198 // scheme. |
199 bool CanSchemeBeOverridden(const std::string& scheme) const; | 199 bool CanSchemeBeOverridden(const std::string& scheme) const; |
200 | 200 |
201 // Returns true if an identical protocol handler has already been registered. | 201 // Returns true if an identical protocol handler has already been registered. |
202 bool IsRegistered(const ProtocolHandler& handler) const; | 202 bool IsRegistered(const ProtocolHandler& handler) const; |
203 | 203 |
| 204 // Returns true if an identical protocol handler has already been registered |
| 205 // by user. |
| 206 bool IsRegisteredByUser(const ProtocolHandler& handler); |
| 207 |
204 // Returns true if an identical protocol handler is being ignored. | 208 // Returns true if an identical protocol handler is being ignored. |
205 bool IsIgnored(const ProtocolHandler& handler) const; | 209 bool IsIgnored(const ProtocolHandler& handler) const; |
206 | 210 |
207 // Returns true if an equivalent protocol handler has already been registered. | 211 // Returns true if an equivalent protocol handler has already been registered. |
208 bool HasRegisteredEquivalent(const ProtocolHandler& handler) const; | 212 bool HasRegisteredEquivalent(const ProtocolHandler& handler) const; |
209 | 213 |
210 // Returns true if an equivalent protocol handler is being ignored. | 214 // Returns true if an equivalent protocol handler is being ignored. |
211 bool HasIgnoredEquivalent(const ProtocolHandler& handler) const; | 215 bool HasIgnoredEquivalent(const ProtocolHandler& handler) const; |
212 | 216 |
213 // Causes the given protocol handler to not be ignored anymore. | 217 // Causes the given protocol handler to not be ignored anymore. |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
368 | 372 |
369 // Copy of registry data for use on the IO thread. Changes to the registry | 373 // Copy of registry data for use on the IO thread. Changes to the registry |
370 // are posted to the IO thread where updates are applied to this object. | 374 // are posted to the IO thread where updates are applied to this object. |
371 scoped_refptr<IOThreadDelegate> io_thread_delegate_; | 375 scoped_refptr<IOThreadDelegate> io_thread_delegate_; |
372 | 376 |
373 DefaultClientObserverList default_client_observers_; | 377 DefaultClientObserverList default_client_observers_; |
374 | 378 |
375 DISALLOW_COPY_AND_ASSIGN(ProtocolHandlerRegistry); | 379 DISALLOW_COPY_AND_ASSIGN(ProtocolHandlerRegistry); |
376 }; | 380 }; |
377 #endif // CHROME_BROWSER_CUSTOM_HANDLERS_PROTOCOL_HANDLER_REGISTRY_H_ | 381 #endif // CHROME_BROWSER_CUSTOM_HANDLERS_PROTOCOL_HANDLER_REGISTRY_H_ |
OLD | NEW |