| 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 #include "chrome/browser/permissions/mock_permission_request.h" | 5 #include "chrome/browser/permissions/mock_permission_request.h" |
| 6 | 6 |
| 7 #include "base/strings/string16.h" | 7 #include "base/strings/string16.h" |
| 8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
| 9 #include "ui/vector_icons/vector_icons.h" | 9 #include "ui/vector_icons/vector_icons.h" |
| 10 | 10 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 const std::string& text, | 29 const std::string& text, |
| 30 PermissionRequestType request_type, | 30 PermissionRequestType request_type, |
| 31 PermissionRequestGestureType gesture_type) | 31 PermissionRequestGestureType gesture_type) |
| 32 : MockPermissionRequest(text, | 32 : MockPermissionRequest(text, |
| 33 "button", | 33 "button", |
| 34 "button", | 34 "button", |
| 35 GURL("http://www.google.com"), | 35 GURL("http://www.google.com"), |
| 36 request_type, | 36 request_type, |
| 37 gesture_type) {} | 37 gesture_type) {} |
| 38 | 38 |
| 39 MockPermissionRequest::MockPermissionRequest( | 39 MockPermissionRequest::MockPermissionRequest(const std::string& text, |
| 40 const std::string& text, | 40 PermissionRequestType request_type, |
| 41 const GURL& url) | 41 const GURL& url) |
| 42 : MockPermissionRequest(text, | 42 : MockPermissionRequest(text, |
| 43 "button", | 43 "button", |
| 44 "button", | 44 "button", |
| 45 url, | 45 url, |
| 46 PermissionRequestType::UNKNOWN, | 46 request_type, |
| 47 PermissionRequestGestureType::UNKNOWN) {} | 47 PermissionRequestGestureType::UNKNOWN) {} |
| 48 | 48 |
| 49 MockPermissionRequest::MockPermissionRequest( | 49 MockPermissionRequest::MockPermissionRequest( |
| 50 const std::string& text, | 50 const std::string& text, |
| 51 const std::string& accept_label, | 51 const std::string& accept_label, |
| 52 const std::string& deny_label) | 52 const std::string& deny_label) |
| 53 : MockPermissionRequest(text, | 53 : MockPermissionRequest(text, |
| 54 accept_label, | 54 accept_label, |
| 55 deny_label, | 55 deny_label, |
| 56 GURL("http://www.google.com"), | 56 GURL("http://www.google.com"), |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 : granted_(false), | 121 : granted_(false), |
| 122 cancelled_(false), | 122 cancelled_(false), |
| 123 finished_(false), | 123 finished_(false), |
| 124 request_type_(request_type), | 124 request_type_(request_type), |
| 125 gesture_type_(gesture_type) { | 125 gesture_type_(gesture_type) { |
| 126 text_ = base::UTF8ToUTF16(text); | 126 text_ = base::UTF8ToUTF16(text); |
| 127 accept_label_ = base::UTF8ToUTF16(accept_label); | 127 accept_label_ = base::UTF8ToUTF16(accept_label); |
| 128 deny_label_ = base::UTF8ToUTF16(deny_label); | 128 deny_label_ = base::UTF8ToUTF16(deny_label); |
| 129 origin_ = origin.GetOrigin(); | 129 origin_ = origin.GetOrigin(); |
| 130 } | 130 } |
| OLD | NEW |