OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_PERMISSIONS_PERMISSION_REQUEST_H_ | 5 #ifndef CHROME_BROWSER_PERMISSIONS_PERMISSION_REQUEST_H_ |
6 #define CHROME_BROWSER_PERMISSIONS_PERMISSION_REQUEST_H_ | 6 #define CHROME_BROWSER_PERMISSIONS_PERMISSION_REQUEST_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/strings/string16.h" | 9 #include "base/strings/string16.h" |
10 #include "components/content_settings/core/common/content_settings_types.h" | 10 #include "components/content_settings/core/common/content_settings_types.h" |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 // On desktop, we use a vector icon. | 69 // On desktop, we use a vector icon. |
70 typedef const gfx::VectorIcon& IconId; | 70 typedef const gfx::VectorIcon& IconId; |
71 #endif | 71 #endif |
72 | 72 |
73 PermissionRequest(); | 73 PermissionRequest(); |
74 virtual ~PermissionRequest() {} | 74 virtual ~PermissionRequest() {} |
75 | 75 |
76 // The icon to use next to the message text fragment in the permission bubble. | 76 // The icon to use next to the message text fragment in the permission bubble. |
77 virtual IconId GetIconId() const = 0; | 77 virtual IconId GetIconId() const = 0; |
78 | 78 |
| 79 #if defined(OS_ANDROID) |
| 80 // Returns the full prompt text for this permission. This is currently only |
| 81 // used on Android. |
| 82 virtual base::string16 GetMessageText() const = 0; |
| 83 #endif |
| 84 |
79 // Returns the shortened prompt text for this permission. Must be phrased | 85 // Returns the shortened prompt text for this permission. Must be phrased |
80 // as a heading, e.g. "Location", or "Camera". The permission bubble may | 86 // as a heading, e.g. "Location", or "Camera". The permission bubble may |
81 // coalesce different requests, and if it does, this text will be displayed | 87 // coalesce different requests, and if it does, this text will be displayed |
82 // next to an image and indicate the user grants the permission. | 88 // next to an image and indicate the user grants the permission. |
83 virtual base::string16 GetMessageTextFragment() const = 0; | 89 virtual base::string16 GetMessageTextFragment() const = 0; |
84 | 90 |
85 // Get the origin on whose behalf this permission request is being made. | 91 // Get the origin on whose behalf this permission request is being made. |
86 virtual GURL GetOrigin() const = 0; | 92 virtual GURL GetOrigin() const = 0; |
87 | 93 |
88 // Called when the user has granted the requested permission. | 94 // Called when the user has granted the requested permission. |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 bool persist() const { return persist_; } | 129 bool persist() const { return persist_; } |
124 | 130 |
125 private: | 131 private: |
126 // Whether or not the response for this prompt should be persisted. | 132 // Whether or not the response for this prompt should be persisted. |
127 bool persist_; | 133 bool persist_; |
128 | 134 |
129 DISALLOW_COPY_AND_ASSIGN(PermissionRequest); | 135 DISALLOW_COPY_AND_ASSIGN(PermissionRequest); |
130 }; | 136 }; |
131 | 137 |
132 #endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_REQUEST_H_ | 138 #endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_REQUEST_H_ |
OLD | NEW |