1 // Copyright 2013 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_CONTENT_SETTINGS_PERMISSION_REQUEST_ID_H_
6 #define CHROME_BROWSER_CONTENT_SETTINGS_PERMISSION_REQUEST_ID_H_
10 // Uniquely identifies a particular permission request.
11 class PermissionRequestID
{
13 PermissionRequestID(int render_process_id
,
17 ~PermissionRequestID();
19 int render_process_id() const { return render_process_id_
; }
20 int render_view_id() const { return render_view_id_
; }
21 int bridge_id() const { return bridge_id_
; }
22 int group_id() const { return group_id_
; }
24 bool Equals(const PermissionRequestID
& other
) const;
25 bool IsForSameTabAs(const PermissionRequestID
& other
) const;
26 std::string
ToString() const;
29 int render_process_id_
;
31 // Id unique to this instance.
33 // Id possibly shared by multiple instance. This is used in
34 // PermissionQueueController::CancelInfoBarRequests(int group_id) to cancel
35 // multiple permission requests by a group id.
36 // For example, ProtectedMediaIdentifierPermissionContext class uses this.
37 // If you don't use that function, this doesn't matter and setting this to 0
41 // Purposefully do not disable copying, as this is stored in STL containers.
44 #endif // CHROME_BROWSER_CONTENT_SETTINGS_PERMISSION_REQUEST_ID_H_