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. 4 5 #ifndef CHROME_BROWSER_CONTENT_SETTINGS_PERMISSION_REQUEST_ID_H_ 6 #define CHROME_BROWSER_CONTENT_SETTINGS_PERMISSION_REQUEST_ID_H_ 7 8 #include <string> 9 10 // Uniquely identifies a particular permission request. 11 class PermissionRequestID { 12 public: 13 PermissionRequestID(int render_process_id, int render_view_id, int bridge_id); 14 ~PermissionRequestID(); 15 16 int render_process_id() const { return render_process_id_; } 17 int render_view_id() const { return render_view_id_; } 18 int bridge_id() const { return bridge_id_; } 19 20 bool Equals(const PermissionRequestID& other) const; 21 bool IsForSameTabAs(const PermissionRequestID& other) const; 22 std::string ToString() const; 23 24 private: 25 int render_process_id_; 26 int render_view_id_; 27 int bridge_id_; 28 29 // Purposefully do not disable copying, as this is stored in STL containers. 30 }; 31 32 #endif // CHROME_BROWSER_CONTENT_SETTINGS_PERMISSION_REQUEST_ID_H_ 33