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/content_settings/permission_context_base.h" | 5 #include "chrome/browser/content_settings/permission_context_base.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "chrome/browser/content_settings/permission_queue_controller.h" | 9 #include "chrome/browser/content_settings/permission_queue_controller.h" |
10 #include "chrome/browser/infobars/infobar_service.h" | 10 #include "chrome/browser/infobars/infobar_service.h" |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 permission_granted_ = content_setting == CONTENT_SETTING_ALLOW; | 53 permission_granted_ = content_setting == CONTENT_SETTING_ALLOW; |
54 } | 54 } |
55 | 55 |
56 protected: | 56 protected: |
57 void UpdateTabContext(const PermissionRequestID& id, | 57 void UpdateTabContext(const PermissionRequestID& id, |
58 const GURL& requesting_origin, | 58 const GURL& requesting_origin, |
59 bool allowed) override { | 59 bool allowed) override { |
60 tab_context_updated_ = true; | 60 tab_context_updated_ = true; |
61 } | 61 } |
62 | 62 |
| 63 bool IsRestrictedToSecureOrigins() const override { |
| 64 return false; |
| 65 } |
| 66 |
63 private: | 67 private: |
64 bool permission_set_; | 68 bool permission_set_; |
65 bool permission_granted_; | 69 bool permission_granted_; |
66 bool tab_context_updated_; | 70 bool tab_context_updated_; |
67 }; | 71 }; |
68 | 72 |
69 class PermissionContextBaseTests : public ChromeRenderViewHostTestHarness { | 73 class PermissionContextBaseTests : public ChromeRenderViewHostTestHarness { |
70 protected: | 74 protected: |
71 PermissionContextBaseTests() {} | 75 PermissionContextBaseTests() {} |
72 | 76 |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
285 #endif | 289 #endif |
286 TestGrantAndRevoke_TestContent(CONTENT_SETTINGS_TYPE_MIDI_SYSEX, | 290 TestGrantAndRevoke_TestContent(CONTENT_SETTINGS_TYPE_MIDI_SYSEX, |
287 CONTENT_SETTING_ASK); | 291 CONTENT_SETTING_ASK); |
288 TestGrantAndRevoke_TestContent(CONTENT_SETTINGS_TYPE_PUSH_MESSAGING, | 292 TestGrantAndRevoke_TestContent(CONTENT_SETTINGS_TYPE_PUSH_MESSAGING, |
289 CONTENT_SETTING_ASK); | 293 CONTENT_SETTING_ASK); |
290 #if defined(OS_ANDROID) | 294 #if defined(OS_ANDROID) |
291 TestGrantAndRevoke_TestContent( | 295 TestGrantAndRevoke_TestContent( |
292 CONTENT_SETTINGS_TYPE_PROTECTED_MEDIA_IDENTIFIER, CONTENT_SETTING_ASK); | 296 CONTENT_SETTINGS_TYPE_PROTECTED_MEDIA_IDENTIFIER, CONTENT_SETTING_ASK); |
293 #endif | 297 #endif |
294 } | 298 } |
OLD | NEW |