Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / chrome / browser / custom_handlers / register_protocol_handler_permission_request.h
blob7caf082a62ff7f11573ac1f62bfceea005107f22
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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_CUSTOM_HANDLERS_REGISTER_PROTOCOL_HANDLER_PERMISSION_REQUEST_H_
6 #define CHROME_BROWSER_CUSTOM_HANDLERS_REGISTER_PROTOCOL_HANDLER_PERMISSION_REQUEST_H_
8 #include "chrome/browser/ui/website_settings/permission_bubble_request.h"
9 #include "chrome/common/custom_handlers/protocol_handler.h"
11 class ProtocolHandlerRegistry;
13 // This class provides display data for a permission bubble request, shown when
14 // a page wants to register a protocol handler and was triggered by a user
15 // action.
16 class RegisterProtocolHandlerPermissionRequest
17 : public PermissionBubbleRequest {
18 public:
19 RegisterProtocolHandlerPermissionRequest(
20 ProtocolHandlerRegistry* registry,
21 const ProtocolHandler& handler,
22 GURL url,
23 bool user_gesture);
24 ~RegisterProtocolHandlerPermissionRequest() override;
26 // PermissionBubbleRequest:
27 int GetIconID() const override;
28 base::string16 GetMessageText() const override;
29 base::string16 GetMessageTextFragment() const override;
30 bool HasUserGesture() const override;
31 GURL GetRequestingHostname() const override;
32 void PermissionGranted() override;
33 void PermissionDenied() override;
34 void Cancelled() override;
35 void RequestFinished() override;
37 private:
38 ProtocolHandlerRegistry* registry_;
39 ProtocolHandler handler_;
40 GURL url_;
41 bool user_gesture_;
43 DISALLOW_COPY_AND_ASSIGN(RegisterProtocolHandlerPermissionRequest);
46 #endif // CHROME_BROWSER_CUSTOM_HANDLERS_REGISTER_PROTOCOL_HANDLER_PERMISSION_REQUEST_H_