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

Side by Side Diff: chrome/browser/ui/cocoa/infobars/media_stream_infobar_controller.mm

Issue 10912004: Begin adding support for tab mirroring via the MediaStream audio/video capturing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: REBASE Created 8 years, 3 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
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 #import "chrome/browser/ui/cocoa/infobars/media_stream_infobar_controller.h" 5 #import "chrome/browser/ui/cocoa/infobars/media_stream_infobar_controller.h"
6 6
7 #import <Cocoa/Cocoa.h> 7 #import <Cocoa/Cocoa.h>
8 #include <string> 8 #include <string>
9 9
10 #import "base/sys_string_conversions.h" 10 #import "base/sys_string_conversions.h"
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 123
124 // Get the requested media type(s) and add corresponding text to the text 124 // Get the requested media type(s) and add corresponding text to the text
125 // field. 125 // field.
126 int messageId = IDS_MEDIA_CAPTURE_AUDIO_AND_VIDEO; 126 int messageId = IDS_MEDIA_CAPTURE_AUDIO_AND_VIDEO;
127 DCHECK(delegate->HasAudio() || delegate->HasVideo()); 127 DCHECK(delegate->HasAudio() || delegate->HasVideo());
128 if (!delegate->HasAudio()) 128 if (!delegate->HasAudio())
129 messageId = IDS_MEDIA_CAPTURE_VIDEO_ONLY; 129 messageId = IDS_MEDIA_CAPTURE_VIDEO_ONLY;
130 else if (!delegate->HasVideo()) 130 else if (!delegate->HasVideo())
131 messageId = IDS_MEDIA_CAPTURE_AUDIO_ONLY; 131 messageId = IDS_MEDIA_CAPTURE_AUDIO_ONLY;
132 132
133 string16 securityOrigin = UTF8ToUTF16(delegate->GetSecurityOrigin().spec()); 133 string16 securityOrigin = UTF8ToUTF16(delegate->GetSecurityOriginSpec());
134 NSString* text = l10n_util::GetNSStringF(messageId, securityOrigin); 134 NSString* text = l10n_util::GetNSStringF(messageId, securityOrigin);
135 [label1_ setStringValue:text]; 135 [label1_ setStringValue:text];
136 136
137 // Add text to the buttons. 137 // Add text to the buttons.
138 [okButton_ setTitle:GetNSStringWithFixup(IDS_MEDIA_CAPTURE_ALLOW)]; 138 [okButton_ setTitle:GetNSStringWithFixup(IDS_MEDIA_CAPTURE_ALLOW)];
139 [cancelButton_ setTitle:GetNSStringWithFixup(IDS_MEDIA_CAPTURE_DENY)]; 139 [cancelButton_ setTitle:GetNSStringWithFixup(IDS_MEDIA_CAPTURE_DENY)];
140 140
141 // Populating |deviceMenu_| is handled separately. 141 // Populating |deviceMenu_| is handled separately.
142 } 142 }
143 143
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 [[[deviceMenu_ menu] itemAtIndex:0] setTitle:@""]; 251 [[[deviceMenu_ menu] itemAtIndex:0] setTitle:@""];
252 [[deviceMenu_ cell] setArrowPosition:NSPopUpArrowAtCenter]; 252 [[deviceMenu_ cell] setArrowPosition:NSPopUpArrowAtCenter];
253 } 253 }
254 } 254 }
255 255
256 - (void)didChangeFrame:(NSNotification*)notification { 256 - (void)didChangeFrame:(NSNotification*)notification {
257 [self arrangeInfobarLayout]; 257 [self arrangeInfobarLayout];
258 } 258 }
259 259
260 @end // implementation MediaStreamInfoBarController 260 @end // implementation MediaStreamInfoBarController
OLDNEW
« no previous file with comments | « chrome/browser/media/media_stream_devices_menu_model.cc ('k') | chrome/browser/ui/extensions/shell_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698