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 COMPONENTS_CONTENT_SETTINGS_CORE_COMMON_PERMISSION_REQUEST_ID_H_
6 #define COMPONENTS_CONTENT_SETTINGS_CORE_COMMON_PERMISSION_REQUEST_ID_H_
12 // Uniquely identifies a particular permission request.
13 class PermissionRequestID {
15 PermissionRequestID(int render_process_id,
19 ~PermissionRequestID();
21 int render_process_id() const { return render_process_id_; }
22 int render_view_id() const { return render_view_id_; }
23 int bridge_id() const { return bridge_id_; }
24 GURL origin() const { return origin_; }
26 bool Equals(const PermissionRequestID& other) const;
27 bool IsForSameTabAs(const PermissionRequestID& other) const;
28 std::string ToString() const;
31 int render_process_id_;
33 // Id unique to this instance.
35 // Needed for permission checks that are based on origin.
36 // If you don't use origin to check permission request, pass an empty GURL.
39 // Purposefully do not disable copying, as this is stored in STL containers.
42 #endif // COMPONENTS_CONTENT_SETTINGS_CORE_COMMON_PERMISSION_REQUEST_ID_H_