OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_queue_controller.h" | 5 #include "chrome/browser/content_settings/permission_queue_controller.h" |
6 | 6 |
7 #include "base/prefs/pref_service.h" | 7 #include "base/prefs/pref_service.h" |
8 #include "chrome/browser/chrome_notification_types.h" | 8 #include "chrome/browser/chrome_notification_types.h" |
9 #include "chrome/browser/content_settings/permission_context_uma_util.h" | 9 #include "chrome/browser/content_settings/permission_context_uma_util.h" |
10 #include "chrome/browser/geolocation/geolocation_infobar_delegate.h" | 10 #include "chrome/browser/geolocation/geolocation_infobar_delegate.h" |
(...skipping 13 matching lines...) Expand all Loading... | |
24 #include "content/public/browser/web_contents.h" | 24 #include "content/public/browser/web_contents.h" |
25 #include "content/public/common/url_constants.h" | 25 #include "content/public/common/url_constants.h" |
26 | 26 |
27 #if defined(OS_ANDROID) || defined(OS_CHROMEOS) | 27 #if defined(OS_ANDROID) || defined(OS_CHROMEOS) |
28 #include "chrome/browser/media/protected_media_identifier_infobar_delegate.h" | 28 #include "chrome/browser/media/protected_media_identifier_infobar_delegate.h" |
29 #endif | 29 #endif |
30 | 30 |
31 namespace { | 31 namespace { |
32 | 32 |
33 InfoBarService* GetInfoBarService(const PermissionRequestID& id) { | 33 InfoBarService* GetInfoBarService(const PermissionRequestID& id) { |
34 content::WebContents* web_contents = | 34 content::WebContents* web_contents = tab_util::GetWebContentsByFrameID( |
Bernhard Bauer
2015/05/27 08:26:40
Remove one space after the equals sign.
mlamouri (slow - plz ping)
2015/05/30 13:31:05
Done.
| |
35 tab_util::GetWebContentsByID(id.render_process_id(), id.render_view_id()); | 35 id.render_process_id(), id.render_frame_id()); |
36 return web_contents ? InfoBarService::FromWebContents(web_contents) : NULL; | 36 return web_contents ? InfoBarService::FromWebContents(web_contents) : NULL; |
37 } | 37 } |
38 | 38 |
39 } | 39 } |
40 | 40 |
41 | 41 |
42 class PermissionQueueController::PendingInfobarRequest { | 42 class PermissionQueueController::PendingInfobarRequest { |
43 public: | 43 public: |
44 PendingInfobarRequest(ContentSettingsType type, | 44 PendingInfobarRequest(ContentSettingsType type, |
45 const PermissionRequestID& id, | 45 const PermissionRequestID& id, |
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
379 ContentSettingsPattern::Wildcard() : | 379 ContentSettingsPattern::Wildcard() : |
380 ContentSettingsPattern::FromURLNoWildcard(embedder.GetOrigin()); | 380 ContentSettingsPattern::FromURLNoWildcard(embedder.GetOrigin()); |
381 | 381 |
382 profile_->GetHostContentSettingsMap()->SetContentSetting( | 382 profile_->GetHostContentSettingsMap()->SetContentSetting( |
383 ContentSettingsPattern::FromURLNoWildcard(requesting_frame.GetOrigin()), | 383 ContentSettingsPattern::FromURLNoWildcard(requesting_frame.GetOrigin()), |
384 embedder_pattern, | 384 embedder_pattern, |
385 type_, | 385 type_, |
386 std::string(), | 386 std::string(), |
387 content_setting); | 387 content_setting); |
388 } | 388 } |
OLD | NEW |