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

Side by Side Diff: chrome/browser/ui/page_info/page_info_ui.cc

Issue 2458453002: [sensors] Add Permission guard to the generic sensor apis.
Patch Set: rebase + blink reformat Created 3 years, 8 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/page_info/page_info_ui.h" 5 #include "chrome/browser/ui/page_info/page_info_ui.h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" 8 #include "chrome/browser/content_settings/host_content_settings_map_factory.h"
9 #include "chrome/browser/permissions/permission_manager.h" 9 #include "chrome/browser/permissions/permission_manager.h"
10 #include "chrome/browser/permissions/permission_result.h" 10 #include "chrome/browser/permissions/permission_result.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 IDR_BLOCKED_MIC, IDR_ALLOWED_MIC}, 80 IDR_BLOCKED_MIC, IDR_ALLOWED_MIC},
81 {CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA, IDS_PAGE_INFO_TYPE_CAMERA, 81 {CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA, IDS_PAGE_INFO_TYPE_CAMERA,
82 IDR_BLOCKED_CAMERA, IDR_ALLOWED_CAMERA}, 82 IDR_BLOCKED_CAMERA, IDR_ALLOWED_CAMERA},
83 {CONTENT_SETTINGS_TYPE_AUTOMATIC_DOWNLOADS, 83 {CONTENT_SETTINGS_TYPE_AUTOMATIC_DOWNLOADS,
84 IDS_AUTOMATIC_DOWNLOADS_TAB_LABEL, IDR_BLOCKED_DOWNLOADS, 84 IDS_AUTOMATIC_DOWNLOADS_TAB_LABEL, IDR_BLOCKED_DOWNLOADS,
85 IDR_ALLOWED_DOWNLOADS}, 85 IDR_ALLOWED_DOWNLOADS},
86 {CONTENT_SETTINGS_TYPE_MIDI_SYSEX, IDS_PAGE_INFO_TYPE_MIDI_SYSEX, 86 {CONTENT_SETTINGS_TYPE_MIDI_SYSEX, IDS_PAGE_INFO_TYPE_MIDI_SYSEX,
87 IDR_BLOCKED_MIDI_SYSEX, IDR_ALLOWED_MIDI_SYSEX}, 87 IDR_BLOCKED_MIDI_SYSEX, IDR_ALLOWED_MIDI_SYSEX},
88 {CONTENT_SETTINGS_TYPE_BACKGROUND_SYNC, IDS_PAGE_INFO_TYPE_BACKGROUND_SYNC, 88 {CONTENT_SETTINGS_TYPE_BACKGROUND_SYNC, IDS_PAGE_INFO_TYPE_BACKGROUND_SYNC,
89 IDR_BLOCKED_BACKGROUND_SYNC, IDR_ALLOWED_BACKGROUND_SYNC}, 89 IDR_BLOCKED_BACKGROUND_SYNC, IDR_ALLOWED_BACKGROUND_SYNC},
90 {CONTENT_SETTINGS_TYPE_SENSORS, IDS_WEBSITE_SETTINGS_TYPE_SENSORS,
91 IDR_BLOCKED_SENSORS, IDR_ALLOWED_SENSORS},
90 // Autoplay is Android-only at the moment, and the Origin Info bubble in 92 // Autoplay is Android-only at the moment, and the Origin Info bubble in
91 // Android ignores these block/allow icon pairs, so we can specify 0 there. 93 // Android ignores these block/allow icon pairs, so we can specify 0 there.
92 {CONTENT_SETTINGS_TYPE_AUTOPLAY, IDS_PAGE_INFO_TYPE_AUTOPLAY, 0, 0}, 94 {CONTENT_SETTINGS_TYPE_AUTOPLAY, IDS_PAGE_INFO_TYPE_AUTOPLAY, 0, 0},
93 {CONTENT_SETTINGS_TYPE_SUBRESOURCE_FILTER, IDS_SUBRESOURCE_FILTER_HEADER, 95 {CONTENT_SETTINGS_TYPE_SUBRESOURCE_FILTER, IDS_SUBRESOURCE_FILTER_HEADER,
94 IDR_ALLOWED_SUBRESOURCE_FILTER, IDR_BLOCKED_SUBRESOURCE_FILTER}, 96 IDR_ALLOWED_SUBRESOURCE_FILTER, IDR_BLOCKED_SUBRESOURCE_FILTER},
95 }; 97 };
96 98
97 std::unique_ptr<PageInfoUI::SecurityDescription> CreateSecurityDescription( 99 std::unique_ptr<PageInfoUI::SecurityDescription> CreateSecurityDescription(
98 int summary_id, 100 int summary_id,
99 int details_id) { 101 int details_id) {
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 } 396 }
395 return resource_id; 397 return resource_id;
396 } 398 }
397 399
398 // static 400 // static
399 const gfx::Image& PageInfoUI::GetConnectionIcon( 401 const gfx::Image& PageInfoUI::GetConnectionIcon(
400 PageInfo::SiteConnectionStatus status) { 402 PageInfo::SiteConnectionStatus status) {
401 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); 403 ResourceBundle& rb = ResourceBundle::GetSharedInstance();
402 return rb.GetNativeImageNamed(GetConnectionIconID(status)); 404 return rb.GetNativeImageNamed(GetConnectionIconID(status));
403 } 405 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/page_info/page_info.cc ('k') | chrome/browser/ui/views/page_info/page_info_bubble_view_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698