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

Side by Side Diff: chrome/browser/permissions/permission_request.h

Issue 2897223002: Fix message text for modal prompts when PermissionRequestManager enabled (Closed)
Patch Set: add mic/cam in switch Created 3 years, 7 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 unified diff | Download patch
OLDNEW
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
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 // Returns the full prompt text for this permission.
raymes 2017/05/29 04:48:27 Can we make a note that this is only currently use
Timothy Loh 2017/05/30 05:02:34 Done
80 virtual base::string16 GetMessageText() const = 0;
81
79 // Returns the shortened prompt text for this permission. Must be phrased 82 // Returns the shortened prompt text for this permission. Must be phrased
80 // as a heading, e.g. "Location", or "Camera". The permission bubble may 83 // 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 84 // coalesce different requests, and if it does, this text will be displayed
82 // next to an image and indicate the user grants the permission. 85 // next to an image and indicate the user grants the permission.
83 virtual base::string16 GetMessageTextFragment() const = 0; 86 virtual base::string16 GetMessageTextFragment() const = 0;
84 87
85 // Get the origin on whose behalf this permission request is being made. 88 // Get the origin on whose behalf this permission request is being made.
86 virtual GURL GetOrigin() const = 0; 89 virtual GURL GetOrigin() const = 0;
87 90
88 // Called when the user has granted the requested permission. 91 // Called when the user has granted the requested permission.
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 bool persist() const { return persist_; } 126 bool persist() const { return persist_; }
124 127
125 private: 128 private:
126 // Whether or not the response for this prompt should be persisted. 129 // Whether or not the response for this prompt should be persisted.
127 bool persist_; 130 bool persist_;
128 131
129 DISALLOW_COPY_AND_ASSIGN(PermissionRequest); 132 DISALLOW_COPY_AND_ASSIGN(PermissionRequest);
130 }; 133 };
131 134
132 #endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_REQUEST_H_ 135 #endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_REQUEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698