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

Side by Side Diff: chrome/browser/ui/views/desktop_capture/desktop_media_picker_views.cc

Issue 2922263002: Fix style of profile error dialog. (Closed)
Patch Set: nit Created 3 years, 6 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 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/ui/views/desktop_capture/desktop_media_picker_views.h" 5 #include "chrome/browser/ui/views/desktop_capture/desktop_media_picker_views.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "chrome/browser/media/webrtc/desktop_media_list.h" 8 #include "chrome/browser/media/webrtc/desktop_media_list.h"
9 #include "chrome/browser/ui/browser_dialogs.h" 9 #include "chrome/browser/ui/browser_dialogs.h"
10 #include "chrome/browser/ui/browser_finder.h" 10 #include "chrome/browser/ui/browser_finder.h"
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 return list_views_[0]; 293 return list_views_[0];
294 } 294 }
295 295
296 base::string16 DesktopMediaPickerDialogView::GetDialogButtonLabel( 296 base::string16 DesktopMediaPickerDialogView::GetDialogButtonLabel(
297 ui::DialogButton button) const { 297 ui::DialogButton button) const {
298 return l10n_util::GetStringUTF16(button == ui::DIALOG_BUTTON_OK 298 return l10n_util::GetStringUTF16(button == ui::DIALOG_BUTTON_OK
299 ? IDS_DESKTOP_MEDIA_PICKER_SHARE 299 ? IDS_DESKTOP_MEDIA_PICKER_SHARE
300 : IDS_CANCEL); 300 : IDS_CANCEL);
301 } 301 }
302 302
303 bool DesktopMediaPickerDialogView::ShouldDefaultButtonBeBlue() const {
304 return true;
305 }
306
307 views::View* DesktopMediaPickerDialogView::CreateExtraView() { 303 views::View* DesktopMediaPickerDialogView::CreateExtraView() {
308 return audio_share_checkbox_; 304 return audio_share_checkbox_;
309 } 305 }
310 306
311 bool DesktopMediaPickerDialogView::Accept() { 307 bool DesktopMediaPickerDialogView::Accept() {
312 DesktopMediaSourceView* selection = 308 DesktopMediaSourceView* selection =
313 list_views_[pane_->GetSelectedTabIndex()]->GetSelection(); 309 list_views_[pane_->GetSelectedTabIndex()]->GetSelection();
314 310
315 // Ok button should only be enabled when a source is selected. 311 // Ok button should only be enabled when a source is selected.
316 DCHECK(selection); 312 DCHECK(selection);
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 // DesktopMediaPicker. 438 // DesktopMediaPicker.
443 content::BrowserThread::PostTask(content::BrowserThread::UI, FROM_HERE, 439 content::BrowserThread::PostTask(content::BrowserThread::UI, FROM_HERE,
444 base::BindOnce(callback_, source)); 440 base::BindOnce(callback_, source));
445 callback_.Reset(); 441 callback_.Reset();
446 } 442 }
447 443
448 // static 444 // static
449 std::unique_ptr<DesktopMediaPicker> DesktopMediaPicker::Create() { 445 std::unique_ptr<DesktopMediaPicker> DesktopMediaPicker::Create() {
450 return std::unique_ptr<DesktopMediaPicker>(new DesktopMediaPickerViews()); 446 return std::unique_ptr<DesktopMediaPicker>(new DesktopMediaPickerViews());
451 } 447 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698