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

Side by Side Diff: chrome/browser/ui/content_settings/content_setting_image_model.cc

Issue 19022004: Minimum possible change to avoid "mic" icon in omnibox for site permissions. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/content_settings/content_setting_image_model.h" 5 #include "chrome/browser/ui/content_settings/content_setting_image_model.h"
6 6
7 #include "chrome/browser/content_settings/host_content_settings_map.h" 7 #include "chrome/browser/content_settings/host_content_settings_map.h"
8 #include "chrome/browser/content_settings/tab_specific_content_settings.h" 8 #include "chrome/browser/content_settings/tab_specific_content_settings.h"
9 #include "chrome/browser/prerender/prerender_manager.h" 9 #include "chrome/browser/prerender/prerender_manager.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 return; 224 return;
225 TabSpecificContentSettings::MicrophoneCameraState state = 225 TabSpecificContentSettings::MicrophoneCameraState state =
226 content_settings->GetMicrophoneCameraState(); 226 content_settings->GetMicrophoneCameraState();
227 227
228 switch (state) { 228 switch (state) {
229 case TabSpecificContentSettings::MICROPHONE_CAMERA_NOT_ACCESSED: 229 case TabSpecificContentSettings::MICROPHONE_CAMERA_NOT_ACCESSED:
230 // If neither the microphone nor the camera stream was accessed then no 230 // If neither the microphone nor the camera stream was accessed then no
231 // icon is displayed in the omnibox. 231 // icon is displayed in the omnibox.
232 return; 232 return;
233 case TabSpecificContentSettings::MICROPHONE_ACCESSED: 233 case TabSpecificContentSettings::MICROPHONE_ACCESSED:
234 set_icon(IDR_ALLOWED_MICROPHONE); 234 set_icon(IDR_ASK_MEDIA);
235 set_tooltip(l10n_util::GetStringUTF8(IDS_MICROPHONE_ACCESSED)); 235 set_tooltip(l10n_util::GetStringUTF8(IDS_MICROPHONE_ACCESSED));
236 break; 236 break;
237 case TabSpecificContentSettings::CAMERA_ACCESSED: 237 case TabSpecificContentSettings::CAMERA_ACCESSED:
238 set_icon(IDR_ASK_MEDIA); 238 set_icon(IDR_ASK_MEDIA);
239 set_tooltip(l10n_util::GetStringUTF8(IDS_CAMERA_ACCESSED)); 239 set_tooltip(l10n_util::GetStringUTF8(IDS_CAMERA_ACCESSED));
240 break; 240 break;
241 case TabSpecificContentSettings::MICROPHONE_CAMERA_ACCESSED: 241 case TabSpecificContentSettings::MICROPHONE_CAMERA_ACCESSED:
242 set_icon(IDR_ASK_MEDIA); 242 set_icon(IDR_ASK_MEDIA);
243 set_tooltip(l10n_util::GetStringUTF8(IDS_MICROPHONE_CAMERA_ALLOWED)); 243 set_tooltip(l10n_util::GetStringUTF8(IDS_MICROPHONE_CAMERA_ALLOWED));
244 break; 244 break;
245 case TabSpecificContentSettings::MICROPHONE_BLOCKED: 245 case TabSpecificContentSettings::MICROPHONE_BLOCKED:
246 set_icon(IDR_BLOCKED_MICROPHONE); 246 set_icon(IDR_BLOCKED_MEDIA);
247 set_tooltip(l10n_util::GetStringUTF8(IDS_MICROPHONE_BLOCKED)); 247 set_tooltip(l10n_util::GetStringUTF8(IDS_MICROPHONE_BLOCKED));
248 break; 248 break;
249 case TabSpecificContentSettings::CAMERA_BLOCKED: 249 case TabSpecificContentSettings::CAMERA_BLOCKED:
250 set_icon(IDR_BLOCKED_MEDIA); 250 set_icon(IDR_BLOCKED_MEDIA);
251 set_tooltip(l10n_util::GetStringUTF8(IDS_CAMERA_BLOCKED)); 251 set_tooltip(l10n_util::GetStringUTF8(IDS_CAMERA_BLOCKED));
252 break; 252 break;
253 case TabSpecificContentSettings::MICROPHONE_CAMERA_BLOCKED: 253 case TabSpecificContentSettings::MICROPHONE_CAMERA_BLOCKED:
254 set_icon(IDR_BLOCKED_MEDIA); 254 set_icon(IDR_BLOCKED_MEDIA);
255 set_tooltip(l10n_util::GetStringUTF8(IDS_MICROPHONE_CAMERA_BLOCKED)); 255 set_tooltip(l10n_util::GetStringUTF8(IDS_MICROPHONE_CAMERA_BLOCKED));
256 break; 256 break;
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 case CONTENT_SETTINGS_TYPE_PROTOCOL_HANDLERS: 311 case CONTENT_SETTINGS_TYPE_PROTOCOL_HANDLERS:
312 return new ContentSettingRPHImageModel(); 312 return new ContentSettingRPHImageModel();
313 case CONTENT_SETTINGS_TYPE_MEDIASTREAM: 313 case CONTENT_SETTINGS_TYPE_MEDIASTREAM:
314 case CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC: 314 case CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC:
315 case CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA: 315 case CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA:
316 return new ContentSettingMediaImageModel(content_settings_type); 316 return new ContentSettingMediaImageModel(content_settings_type);
317 default: 317 default:
318 return new ContentSettingBlockedImageModel(content_settings_type); 318 return new ContentSettingBlockedImageModel(content_settings_type);
319 } 319 }
320 } 320 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698