| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_REGISTER_PROTOCOL_HANDLER_PERMISSION_REQU
EST_H_ | 5 #ifndef CHROME_BROWSER_CUSTOM_HANDLERS_REGISTER_PROTOCOL_HANDLER_PERMISSION_REQU
EST_H_ |
| 6 #define CHROME_BROWSER_CUSTOM_HANDLERS_REGISTER_PROTOCOL_HANDLER_PERMISSION_REQU
EST_H_ | 6 #define CHROME_BROWSER_CUSTOM_HANDLERS_REGISTER_PROTOCOL_HANDLER_PERMISSION_REQU
EST_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "chrome/browser/permissions/permission_request.h" | 9 #include "chrome/browser/permissions/permission_request.h" |
| 10 #include "chrome/common/custom_handlers/protocol_handler.h" | 10 #include "chrome/common/custom_handlers/protocol_handler.h" |
| 11 | 11 |
| 12 class ProtocolHandlerRegistry; | 12 class ProtocolHandlerRegistry; |
| 13 | 13 |
| 14 // This class provides display data for a permission request, shown when a page | 14 // This class provides display data for a permission request, shown when a page |
| 15 // wants to register a protocol handler and was triggered by a user action. | 15 // wants to register a protocol handler and was triggered by a user action. |
| 16 class RegisterProtocolHandlerPermissionRequest : public PermissionRequest { | 16 class RegisterProtocolHandlerPermissionRequest : public PermissionRequest { |
| 17 public: | 17 public: |
| 18 RegisterProtocolHandlerPermissionRequest( | 18 RegisterProtocolHandlerPermissionRequest( |
| 19 ProtocolHandlerRegistry* registry, | 19 ProtocolHandlerRegistry* registry, |
| 20 const ProtocolHandler& handler, | 20 const ProtocolHandler& handler, |
| 21 GURL url, | 21 GURL url, |
| 22 bool user_gesture); | 22 bool user_gesture); |
| 23 ~RegisterProtocolHandlerPermissionRequest() override; | 23 ~RegisterProtocolHandlerPermissionRequest() override; |
| 24 | 24 |
| 25 private: | 25 private: |
| 26 // PermissionRequest: | 26 // PermissionRequest: |
| 27 gfx::VectorIconId GetVectorIconId() const override; | 27 IconId GetIconId() const override; |
| 28 int GetIconId() const override; | |
| 29 base::string16 GetMessageTextFragment() const override; | 28 base::string16 GetMessageTextFragment() const override; |
| 30 GURL GetOrigin() const override; | 29 GURL GetOrigin() const override; |
| 31 void PermissionGranted() override; | 30 void PermissionGranted() override; |
| 32 void PermissionDenied() override; | 31 void PermissionDenied() override; |
| 33 void Cancelled() override; | 32 void Cancelled() override; |
| 34 void RequestFinished() override; | 33 void RequestFinished() override; |
| 35 PermissionRequestType GetPermissionRequestType() const override; | 34 PermissionRequestType GetPermissionRequestType() const override; |
| 36 | 35 |
| 37 ProtocolHandlerRegistry* registry_; | 36 ProtocolHandlerRegistry* registry_; |
| 38 ProtocolHandler handler_; | 37 ProtocolHandler handler_; |
| 39 GURL origin_; | 38 GURL origin_; |
| 40 | 39 |
| 41 DISALLOW_COPY_AND_ASSIGN(RegisterProtocolHandlerPermissionRequest); | 40 DISALLOW_COPY_AND_ASSIGN(RegisterProtocolHandlerPermissionRequest); |
| 42 }; | 41 }; |
| 43 | 42 |
| 44 #endif // CHROME_BROWSER_CUSTOM_HANDLERS_REGISTER_PROTOCOL_HANDLER_PERMISSION_R
EQUEST_H_ | 43 #endif // CHROME_BROWSER_CUSTOM_HANDLERS_REGISTER_PROTOCOL_HANDLER_PERMISSION_R
EQUEST_H_ |
| OLD | NEW |