| 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_EXTERNAL_PROTOCOL_EXTERNAL_PROTOCOL_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_EXTERNAL_PROTOCOL_EXTERNAL_PROTOCOL_HANDLER_H_ |
| 6 #define CHROME_BROWSER_EXTERNAL_PROTOCOL_EXTERNAL_PROTOCOL_HANDLER_H_ | 6 #define CHROME_BROWSER_EXTERNAL_PROTOCOL_EXTERNAL_PROTOCOL_HANDLER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 class DictionaryValue; | |
| 12 class GURL; | 11 class GURL; |
| 13 class PrefService; | 12 class PrefService; |
| 14 | 13 |
| 14 namespace base { |
| 15 class DictionaryValue; |
| 16 } |
| 17 |
| 15 class ExternalProtocolHandler { | 18 class ExternalProtocolHandler { |
| 16 public: | 19 public: |
| 17 enum BlockState { | 20 enum BlockState { |
| 18 DONT_BLOCK, | 21 DONT_BLOCK, |
| 19 BLOCK, | 22 BLOCK, |
| 20 UNKNOWN, | 23 UNKNOWN, |
| 21 }; | 24 }; |
| 22 | 25 |
| 23 // Returns whether we should block a given scheme. | 26 // Returns whether we should block a given scheme. |
| 24 static BlockState GetBlockState(const std::string& scheme); | 27 static BlockState GetBlockState(const std::string& scheme); |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 static void PrepopulateDictionary(DictionaryValue* win_pref); | 72 static void PrepopulateDictionary(DictionaryValue* win_pref); |
| 70 | 73 |
| 71 // Allows LaunchUrl to proceed with launching an external protocol handler. | 74 // Allows LaunchUrl to proceed with launching an external protocol handler. |
| 72 // This is typically triggered by a user gesture, but is also called for | 75 // This is typically triggered by a user gesture, but is also called for |
| 73 // each extension API function. Note that each call to LaunchUrl resets | 76 // each extension API function. Note that each call to LaunchUrl resets |
| 74 // the state to false (not allowed). | 77 // the state to false (not allowed). |
| 75 static void PermitLaunchUrl(); | 78 static void PermitLaunchUrl(); |
| 76 }; | 79 }; |
| 77 | 80 |
| 78 #endif // CHROME_BROWSER_EXTERNAL_PROTOCOL_EXTERNAL_PROTOCOL_HANDLER_H_ | 81 #endif // CHROME_BROWSER_EXTERNAL_PROTOCOL_EXTERNAL_PROTOCOL_HANDLER_H_ |
| OLD | NEW |