| 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/ui/website_settings/mock_permission_bubble_request.h" | 5 #include "chrome/browser/ui/website_settings/mock_permission_bubble_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 "grit/theme_resources.h" | 9 #include "grit/theme_resources.h" |
| 10 | 10 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 finished_(false), | 53 finished_(false), |
| 54 user_gesture_(false) { | 54 user_gesture_(false) { |
| 55 text_ = base::UTF8ToUTF16(text); | 55 text_ = base::UTF8ToUTF16(text); |
| 56 accept_label_ = base::UTF8ToUTF16(accept_label); | 56 accept_label_ = base::UTF8ToUTF16(accept_label); |
| 57 deny_label_ = base::UTF8ToUTF16(deny_label); | 57 deny_label_ = base::UTF8ToUTF16(deny_label); |
| 58 hostname_ = GURL("http://www.google.com"); | 58 hostname_ = GURL("http://www.google.com"); |
| 59 } | 59 } |
| 60 | 60 |
| 61 MockPermissionBubbleRequest::~MockPermissionBubbleRequest() {} | 61 MockPermissionBubbleRequest::~MockPermissionBubbleRequest() {} |
| 62 | 62 |
| 63 PermissionBubbleRequest::Type MockPermissionBubbleRequest::GetType() const { |
| 64 return PermissionBubbleRequest::Type::kOther; |
| 65 } |
| 66 |
| 63 int MockPermissionBubbleRequest::GetIconID() const { | 67 int MockPermissionBubbleRequest::GetIconID() const { |
| 64 // Use a valid icon ID to support UI tests. | 68 // Use a valid icon ID to support UI tests. |
| 65 return IDR_INFOBAR_MEDIA_STREAM_CAMERA; | 69 return IDR_INFOBAR_MEDIA_STREAM_CAMERA; |
| 66 } | 70 } |
| 67 | 71 |
| 68 base::string16 MockPermissionBubbleRequest::GetMessageText() const { | 72 base::string16 MockPermissionBubbleRequest::GetMessageText() const { |
| 69 return text_; | 73 return text_; |
| 70 } | 74 } |
| 71 | 75 |
| 72 base::string16 MockPermissionBubbleRequest::GetMessageTextFragment() const { | 76 base::string16 MockPermissionBubbleRequest::GetMessageTextFragment() const { |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 return cancelled_; | 110 return cancelled_; |
| 107 } | 111 } |
| 108 | 112 |
| 109 bool MockPermissionBubbleRequest::finished() { | 113 bool MockPermissionBubbleRequest::finished() { |
| 110 return finished_; | 114 return finished_; |
| 111 } | 115 } |
| 112 | 116 |
| 113 void MockPermissionBubbleRequest::SetHasUserGesture() { | 117 void MockPermissionBubbleRequest::SetHasUserGesture() { |
| 114 user_gesture_ = true; | 118 user_gesture_ = true; |
| 115 } | 119 } |
| OLD | NEW |