Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(228)

Unified Diff: chrome/browser/custom_handlers/register_protocol_handler_permission_request.h

Issue 152143003: [ProtocolHandlers] Add a permission bubble client for RPH requests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tweaks Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/custom_handlers/register_protocol_handler_permission_request.h
diff --git a/chrome/browser/custom_handlers/register_protocol_handler_permission_request.h b/chrome/browser/custom_handlers/register_protocol_handler_permission_request.h
new file mode 100644
index 0000000000000000000000000000000000000000..2486d38005bb02cc2c02ce718af0a9ad4516468b
--- /dev/null
+++ b/chrome/browser/custom_handlers/register_protocol_handler_permission_request.h
@@ -0,0 +1,41 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_CUSTOM_HANDLERS_REGISTER_PROTOCOL_HANDLER_PERMISSION_REQUEST_H_
+#define CHROME_BROWSER_CUSTOM_HANDLERS_REGISTER_PROTOCOL_HANDLER_PERMISSION_REQUEST_H_
+
+#include "chrome/browser/ui/website_settings/permission_bubble_request.h"
+#include "chrome/common/custom_handlers/protocol_handler.h"
+
+class ProtocolHandlerRegistry;
+
+// This class provides display data for a permission bubble request, shown when
+// a page wants to register a protocol handler and was triggered by a user
+// action.
+class RegisterProtocolHandlerPermissionRequest
+ : public PermissionBubbleRequest {
+ public:
+ RegisterProtocolHandlerPermissionRequest(
+ ProtocolHandlerRegistry* registry,
+ const ProtocolHandler& handler);
+ virtual ~RegisterProtocolHandlerPermissionRequest();
+
+ // PermissionBubbleRequest:
+ virtual base::string16 GetMessageText() const OVERRIDE;
+ virtual base::string16 GetMessageTextFragment() const OVERRIDE;
+ virtual base::string16 GetAlternateAcceptButtonText() const OVERRIDE;
+ virtual base::string16 GetAlternateDenyButtonText() const OVERRIDE;
+ virtual void PermissionGranted() OVERRIDE;
+ virtual void PermissionDenied() OVERRIDE;
+ virtual void Cancelled() OVERRIDE;
+ virtual void RequestFinished() OVERRIDE;
+
+ private:
+ ProtocolHandlerRegistry* registry_;
+ ProtocolHandler handler_;
+
+ DISALLOW_COPY_AND_ASSIGN(RegisterProtocolHandlerPermissionRequest);
+};
+
+#endif // CHROME_BROWSER_CUSTOM_HANDLERS_REGISTER_PROTOCOL_HANDLER_PERMISSION_REQUEST_H_
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/custom_handlers/register_protocol_handler_permission_request.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698